예제 #1
0
 private void RunThread()
 {
     try
     {
         _threadFunction();
     }
     finally
     {
         OnThreadFinished?.Invoke(this, new ThreadFinishedEventArgs(this));
     }
 }
예제 #2
0
 private void RunThread()
 {
     try
     {
         _threadFunction();
     }
     finally
     {
         OnThreadFinished?.Invoke(this, new ThreadFinishedEventArgs(this));
         _taskCompletionSource.SetResult(true);
     }
 }