/// <summary> /// Gets a deferral. The deferral is complete when disposed. /// </summary> /// <returns>The deferral.</returns> public IDisposable GetDeferral() { if (_count == null) { _count = new AsyncCountdownEvent(1); } var ret = new Deferral(_count); _count.AddCount(); return ret; }
public DebugView(AsyncCountdownEvent ce) { _ce = ce; }
/// <summary> /// Completes the deferral. /// </summary> void IDisposable.Dispose() { if (_count == null) { return; } _count.Signal(); _count = null; }
/// <summary> /// Creates a new deferral referencing the countdown event of the deferral manager. /// </summary> /// <param name="count">The countdown event of the deferral manager.</param> public Deferral(AsyncCountdownEvent count) { _count = count; }