8 private class ThreadContext
37 if (threadContext ==
null)
59 while (waitHandle ==
null)
89 return (num & 0x7FFFFFFF) != 0;
132 waitHandle.Dispose();
139 waitHandle?.Dispose();
159 if (manualResetEvent !=
null)
163 manualResetEvent.
Set();
188 currentThreadContext._nestedIOCount++;
195 if (currentThreadContext._nestedIOCount >= 50)
219 currentThreadContext._nestedIOCount--;
232 lazyAsyncResult._asyncCallback(lazyAsyncResult);
236 lazyAsyncResult.Cleanup();
256 if (waitHandle ==
null)
261 if (waitHandle !=
null)
static readonly DBNull Value
bool CompletedSynchronously
virtual void Complete(IntPtr userToken)
static ThreadContext CurrentThreadContext
bool LazilyCreateEvent(out ManualResetEvent waitHandle)
object WaitForCompletion(bool snap)
readonly object _asyncState
void ProtectedInvokeCallback(object result, IntPtr userToken)
object InternalWaitForCompletion()
LazyAsyncResult(object myObject, object myState, AsyncCallback myCallBack)
bool InternalPeekCompleted
AsyncCallback _asyncCallback
static ThreadContext t_threadContext
WaitHandle AsyncWaitHandle
void InvokeCallback(object result)
readonly object _asyncObject
static void WorkerThreadComplete(object state)
static readonly System.Net.NetEventSource Log
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)
static int CompareExchange(ref int location1, int value, int comparand)
static int Increment(ref int location)
static TaskScheduler Default
static new TaskFactory< TResult > Factory
virtual void Dispose(bool explicitDisposing)
virtual bool WaitOne(int millisecondsTimeout)
static readonly IntPtr Zero
static CancellationToken None