internal static void CancelCurrentExecutor() { Executor executor = null; lock (Executor.staticStateLock) { } if (executor != null) { executor.Cancel(); } }
/// <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(); } }