public async Task <List <WaitChanNodeInfo> > GetChainAsync(GetWaitChainFlags flags, UInt32 threadId) { var operation = new AsyncOperation(this, flags, threadId); try { return(await operation.GetTask()); } finally { operation.Dispose(); } }
public AsyncOperation(WaitChainSession session, GetWaitChainFlags flags, uint threadId) { this.session = session; this.threadId = threadId; this.flags = flags; completionSource = new TaskCompletionSource <List <WaitChanNodeInfo> >(); gcHandle = GCHandle.Alloc(this, GCHandleType.Normal); nodeCount = 0; nodeArray = null; IssueCall(); }