Unified executor model

This commit is contained in:
M66B
2022-12-13 10:52:39 +01:00
parent 101371854b
commit 6988d4c552
33 changed files with 147 additions and 297 deletions

View File

@@ -73,7 +73,6 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.ExecutorService;
import java.util.regex.Pattern;
import javax.mail.AuthenticationFailedException;
@@ -117,8 +116,6 @@ public class EmailService implements AutoCloseable {
private ServiceAuthenticator authenticator;
private RingBuffer<String> breadcrumbs;
private ExecutorService executor = Helper.getBackgroundExecutor(0, "mail");
static final int PURPOSE_CHECK = 1;
static final int PURPOSE_USE = 2;
static final int PURPOSE_SEARCH = 3;
@@ -207,7 +204,7 @@ public class EmailService implements AutoCloseable {
" use_top=" + use_top);
properties.put("mail.event.scope", "folder");
properties.put("mail.event.executor", executor);
properties.put("mail.event.executor", Helper.getParallelExecutor());
if (!auth_plain)
properties.put("mail." + protocol + ".auth.plain.disable", "true");