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