public BatchAsyncResult(T result, object state) { this.AsyncState = state; this.result = result; completedEvent = new ManualResetEvent(false); isCompleted = false; QueryBatchCounter.Increment(); }
// TODO, 5, AngelList.Query: Figure out how to do call BatchAsynchResult.SignalCompleted() automatically at the end of the executing method, as AsyncResult does. public void SignalCompleted() { completedEvent.Set(); isCompleted = true; QueryBatchCounter.Decrement(); }