/// <summary> /// Create a worker thread, start it, Execute the runnable and terminate /// the thread (one time execution). /// </summary> internal WorkerThread(QwThreadPool tp, string name, ThreadPriority prio, bool isDaemon, IThreadRunnable runnable) : base(name) { _tp = tp; _runnable = runnable; if (runnable != null) { _runOnce = true; } Priority = prio; IsBackground = isDaemon; }
/// <summary> /// Create a worker thread and start it. Waiting for the next Runnable, /// executing it, and waiting for the next Runnable, until the Shutdown /// flag is set. /// </summary> internal WorkerThread(QwThreadPool tp, string name, ThreadPriority prio, bool isDaemon) : this(tp, name, prio, isDaemon, null) { }