ActiveMQ.Util.EventSemaphore.Wait C# (CSharp) Метод

Wait() публичный Метод

public Wait ( ) : void
Результат void
        public void Wait()
        {
            lock (this)
            {
                    Monitor.Wait(this);
            }
            //return mutex.WaitOne(timeout, false);
        }

Same methods

EventSemaphore::Wait ( System.TimeSpan timeout ) : void

Usage Example

 /// <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);
 }
EventSemaphore