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);
}