Wait() public method

public Wait ( ) : void
return void
 /// <summary>
 /// Waits forever for the latch to be completed
 /// <summary>
 public bool await()
 {
     lock (mutex)
     {
         TimeSpan elapsed = new TimeSpan(0, 0, 5);
         while (remaining > 0)
         {
             mutex.Wait(elapsed);
         }
     }
     return(true);
 }