/// <summary> /// Closes this transaction upon future completion. /// </summary> private void CloseWhenComplete(IFuture fut) { fut.Listen(Close); }
/// <summary> /// Initializes a new instance of the <see cref="AsyncResult"/> class. /// </summary> /// <param name="fut">The future to wrap.</param> public AsyncResult(IFuture fut) { _waitHandle = new ManualResetEvent(false); fut.Listen(() => _waitHandle.Set()); }