Example #1
0
 /// <summary>
 /// Closes this transaction upon future completion.
 /// </summary>
 private void CloseWhenComplete(IFuture fut)
 {
     fut.Listen(Close);
 }
Example #2
0
        /// <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());
        }
        /// <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());
        }