Exemplo n.º 1
0
 /// <inheritdoc />
 public void Dispose()
 {
     _enqueueBlock.Complete();
     _enqueueBlock.Completion.GetAwaiter().GetResult();
     _timer.Dispose();
     _processQueueBlock.Complete();
     _processQueueBlock.Completion.GetAwaiter().GetResult();
 }
        /// <inheritdoc />
        public async Task ShutdownAsync()
        {
            _enqueueBlock.Complete();
            await _enqueueBlock.Completion.ConfigureAwait(false);

            await _timer.SlideDelayAsync(true).ConfigureAwait(false);

            _timer.Dispose();

            _processQueueBlock.Complete();
            await _processQueueBlock.Completion.ConfigureAwait(false);
        }