Пример #1
0
        internal static void CancelCurrentExecutor()
        {
            Executor executor = null;

            lock (Executor.staticStateLock)
            {
            }
            if (executor != null)
            {
                executor.Cancel();
            }
        }
Пример #2
0
        /// <summary>
        /// Cancels the execution of the current instance (the instance last passed to PushCurrentExecutor), if any.  If no
        /// instance is Current, then does nothing.
        /// </summary>
        internal static void CancelCurrentExecutor()
        {
            Executor temp = null;

            lock (s_staticStateLock)
            {
                temp = s_currentExecutor;
            }

            if (temp != null)
            {
                temp.Cancel();
            }
        }