Exemple #1
0
        /// <summary>
        /// Cancellation handler for CancellationToken
        /// </summary>
        /// <param name="obj">ConditionVariable object</param>
        private static void CancellationTokenCanceledEventHandler(object obj)
        {
            ConditionVariableOld conditionVar = obj as ConditionVariableOld;

            TurboContract.Assert(conditionVar != null, conditionString: "conditionVar != null");
            lock (conditionVar._internalLock)
            {
                Monitor.PulseAll(conditionVar._internalLock);
            }
        }
        /// <summary>
        /// Cancellation handler for CancellationToken
        /// </summary>
        /// <param name="obj">ConditionVariable object</param>
        private static void CancellationTokenCanceledEventHandler(object obj)
        {
            ConditionVariableOld conditionVar = obj as ConditionVariableOld;

            Debug.Assert(conditionVar != null);
            lock (conditionVar._internalLock)
            {
                Monitor.PulseAll(conditionVar._internalLock);
            }
        }