Example #1
0
        /// <summary>
        /// 通知工作线程已退出。
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void OnThreadExited(object sender, TaskThreadExitedEventArgs e)
        {
            ThreadExited?.Invoke(sender, e);

            if (CurrentThreadCount == 0 && SafeExitWaitHandle != null)
            {
                SafeExitWaitHandle.Set();
            }
        }
 /// <summary>
 /// 通知工作线程已退出。
 /// </summary>
 /// <param name="e"></param>
 protected virtual void OnTaskThreadExited(TaskThreadExitedEventArgs e)
 {
     ThreadExited?.Invoke(this, e);
 }