Exemple #1
0
 public void Enter()
 {
     ThreadNeutralSemaphore.SyncWaiter syncWaiter = this.EnterCore();
     if (syncWaiter != null)
     {
         syncWaiter.Wait();
     }
 }
Exemple #2
0
 public bool TryEnter(TimeSpan timeout)
 {
     ThreadNeutralSemaphore.SyncWaiter syncWaiter = this.EnterCore();
     if (syncWaiter == null)
     {
         return(true);
     }
     return(syncWaiter.Wait(timeout));
 }