protected IndependentThreadExecutor(IExecutorGroup parent, string threadName, TimeSpan breakoutInterval, IConcurrentQueue <IRunnable> taskQueue) : base(parent) { this.terminationCompletionSource = new TaskCompletionSource(); this.taskQueue = taskQueue; this.preciseBreakoutInterval = PreciseTimeSpan.FromTimeSpan(breakoutInterval); this.scheduler = new ExecutorTaskScheduler(this); this.thread = new Thread(this.Loop); if (string.IsNullOrEmpty(threadName)) { this.thread.Name = DefaultWorkerThreadName; } else { this.thread.Name = threadName; } this.thread.Start(); }
public ThreadDisposedExecutor(IExecutorGroup parent) : base(parent, "IndependentThreadExecutor.Default", TimeSpan.Zero) { Action = () => { }; }
protected Executor(IExecutorGroup parent) { this.Parent = parent; }
/// <summary>Creates a new instance of <see cref="SingleThreadEventExecutor"/>.</summary> public IndependentThreadExecutor(IExecutorGroup parent, string threadName, TimeSpan breakoutInterval) : this(parent, threadName, breakoutInterval, new FriendlyConcurrentQueue <IRunnable>()) { }
public IndependentThreadExecutor_out(IExecutorGroup parent) : this(parent, null, DefaultBreakoutInterval) { }