/// <summary> /// Constructs a new monitor. /// </summary> public AsyncMonitor(IAsyncWaitQueue<IDisposable> lockQueue, IAsyncWaitQueue<object> conditionVariableQueue) { _asyncLock = new AsyncLock(lockQueue); _conditionVariable = new AsyncConditionVariable(_asyncLock, conditionVariableQueue); //Enlightenment.Trace.AsyncMonitor_Created(_asyncLock, _conditionVariable); }
/// <summary> /// Creates the key for a lock. /// </summary> /// <param name="asyncLock">The lock to release. May not be <c>null</c>.</param> public Key(AsyncLock asyncLock) { _asyncLock = asyncLock; }
/// <summary> /// Creates an async-compatible condition variable associated with an async-compatible lock. /// </summary> /// <param name="asyncLock">The lock associated with this condition variable.</param> public AsyncConditionVariable(AsyncLock asyncLock) : this(asyncLock, new DefaultAsyncWaitQueue<object>()) { }
public DebugView(AsyncLock mutex) { _mutex = mutex; }
/// <summary> /// Creates an async-compatible condition variable associated with an async-compatible lock. /// </summary> /// <param name="asyncLock">The lock associated with this condition variable.</param> /// <param name="queue">The wait queue used to manage waiters.</param> public AsyncConditionVariable(AsyncLock asyncLock, IAsyncWaitQueue<object> queue) { _asyncLock = asyncLock; _queue = queue; _mutex = new object(); }