Пример #1
0
 /// <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);
 }
Пример #2
0
 /// <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;
 }
Пример #3
0
 /// <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>())
 {
 }
Пример #4
0
 public DebugView(AsyncLock mutex)
 {
     _mutex = mutex;
 }
Пример #5
0
 /// <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();
 }