Example #1
0
 public void StartWork()
 {
     if (thread == null)
     {
         thread = new Thread(new ThreadStart(Loop));
         thread.Start();
     }
     else
     {
         WaitForWork.Set();
     }
 }
Example #2
0
 internal void Stop()
 {
     cancellationTokenSource.Cancel();
     WaitForWork.Set();
 }