Esempio n. 1
0
 public void WaitCompletion()
 {
     Mre.WaitOne();
     if (Exception != null)
     {
         Assert.Fail(Exception.ToString());
     }
     Mre.Reset();
 }
Esempio n. 2
0
 private static void BeginWrite()
 {
     while (Kernel.KeepThreadsRunning)
     {
         Mre.WaitOne();
         while (!_writer.BaseStream.CanWrite)
         {
             if (!Kernel.KeepThreadsRunning)
             {
                 break;
             }
             Thread.Sleep(100);
         }
         if (_writer.BaseStream.CanWrite)
         {
             _writer.WriteLine(TakeJob());
         }
     }
 }