Пример #1
0
 // This runs in separate thread and waits for d to be set to a new value
 private void Run()
 {
     while (!_stop)
     {
         // waits for new data to process
         RunnerAwaiter.Wait();
         _job(_data);
         SenderAwaiter.Signal();
     }
 }
Пример #2
0
 public void Dispose()
 {
     Stop();
     RunnerAwaiter.Dispose();
     SenderAwaiter.Dispose();
 }