Exemplo n.º 1
0
        /// <summary>
        /// Cancel to currently pending call to <see cref="ReadAsync"/> without completing the <see cref="IPipeReader"/>.
        /// </summary>
        void IPipeReader.CancelPendingRead()
        {
            Action awaitable;

            lock (_sync)
            {
                awaitable = _readerAwaitable.Cancel();
            }
            TrySchedule(_readerScheduler, awaitable);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Cancel to currently pending call to <see cref="WritableBuffer.FlushAsync"/> without completing the <see cref="IPipeWriter"/>.
        /// </summary>
        void IPipeWriter.CancelPendingFlush()
        {
            Action awaitable;

            lock (_sync)
            {
                awaitable = _writerAwaitable.Cancel();
            }
            TrySchedule(_writerScheduler, awaitable);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Cancel to currently pending call to <see cref="ReadAsync"/> without completing the <see cref="IPipeReader"/>.
 /// </summary>
 void IPipeReader.CancelPendingRead()
 {
     _readerAwaitable.Cancel();
 }