8 private class ThreadContext
37 if (threadContext ==
null)
61 while (waitHandle ==
null)
91 return (num & 0x7FFFFFFF) != 0;
150 waitHandle.Dispose();
157 waitHandle?.Dispose();
177 if (manualResetEvent !=
null)
181 manualResetEvent.
Set();
206 currentThreadContext._nestedIOCount++;
213 if (currentThreadContext._nestedIOCount >= 50)
237 currentThreadContext._nestedIOCount--;
274 if (waitHandle ==
null)
279 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