mirror of
https://github.com/Kopano-dev/kopano-ol-extension.git
synced 2023-10-10 13:37:40 +02:00
Background Respawn threading model timeout increased and made configurable from PluginDebugger
This commit is contained in:
parent
40601388ee
commit
728d522f4f
@ -53,8 +53,16 @@ namespace Acacia
|
||||
}
|
||||
private static readonly EnumOption<Threading> THREADING = new EnumOption<Threading>("Threading", Threading.BackgroundRespawn);
|
||||
|
||||
[AcaciaOption("Enables or disables ZPush account checking. To enable advanced features, it must be known " +
|
||||
"which accounts use ZPush servers. This option checks responses from ActiveSync servers to " +
|
||||
[AcaciaOption("Sets respawn timeout for BackgroundRespawn threading model.")]
|
||||
public int ThreadingRespawnTimeout
|
||||
{
|
||||
get { return GetOption(null, THREADING_RESPONSE_TIMEOUT); }
|
||||
set { SetOption(null, THREADING_RESPONSE_TIMEOUT, value); }
|
||||
}
|
||||
private static readonly IntOption THREADING_RESPONSE_TIMEOUT = new IntOption("ThreadingRespawnTimeout", 15000);
|
||||
|
||||
[AcaciaOption("Enables or disables ZPush account checking. To enable advanced features, it must be known " +
|
||||
"which accounts use ZPush servers. This option checks responses from ActiveSync servers to " +
|
||||
"identify the ZPush ones.")]
|
||||
public bool ZPushCheck
|
||||
{
|
||||
|
@ -148,7 +148,7 @@ namespace Acacia.Utils
|
||||
_executor = new TasksBackground();
|
||||
break;
|
||||
case DebugOptions.Threading.BackgroundRespawn:
|
||||
_executor = new TasksBackgroundRespawn();
|
||||
_executor = new TasksBackgroundRespawn(GlobalOptions.INSTANCE.ThreadingRespawnTimeout);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -28,10 +28,10 @@ namespace Acacia.Utils
|
||||
public class TasksBackgroundRespawn : TaskExecutor
|
||||
{
|
||||
private readonly BlockingCollection<AcaciaTask> _tasks = new BlockingCollection<AcaciaTask>();
|
||||
public static int TIMEOUT_MS = 5000;
|
||||
|
||||
public TasksBackgroundRespawn()
|
||||
public static int TIMEOUT_MS;
|
||||
public TasksBackgroundRespawn(int timeout_ms)
|
||||
{
|
||||
TIMEOUT_MS = timeout_ms;
|
||||
Thread t = new Thread(Watcher);
|
||||
t.SetApartmentState(ApartmentState.STA);
|
||||
t.Start();
|
||||
|
Loading…
Reference in New Issue
Block a user