System.Threading.ThreadPool.ThreadPool.UnsafeQueueUserWorkItem C# (CSharp) Method

UnsafeQueueUserWorkItem() private method

private UnsafeQueueUserWorkItem ( WaitCallback callBack, object state ) : bool
callBack WaitCallback
state object
return bool
		public static bool UnsafeQueueUserWorkItem (WaitCallback callBack, object state)
		{
			// no stack propagation here (that's why it's unsafe and requires extra security permissions)
			IAsyncResult ar = null;
			try {
				if (!ExecutionContext.IsFlowSuppressed ())
					ExecutionContext.SuppressFlow (); // on current thread only

				ar = callBack.BeginInvoke (state, null, null);
			}
			finally {
				if (ExecutionContext.IsFlowSuppressed ())
					ExecutionContext.RestoreFlow ();
			}
			return (ar != null);
		}