public async Task PriorityProducerConsumer_Pending_Dispose()
        {
            var ppc          = new PriorityProducerConsumer <int>();
            var consumerTask = ppc.ConsumeAsync();

            Assert.AreEqual(TaskStatus.WaitingForActivation, consumerTask.Status);

            ppc.Dispose();
            await consumerTask.ContinueWith(t => { });

            Assert.AreEqual(TaskStatus.Canceled, consumerTask.Status);
        }
Пример #2
0
 public void Dispose() => _ppc.Dispose();