From 6f5070c20c178ad547764585adcdc74f2f7ebf02 Mon Sep 17 00:00:00 2001 From: bezzad Date: Sun, 5 Nov 2023 22:57:01 +0330 Subject: [PATCH] removed extra warning comments --- src/Downloader/ConcurrentStream.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Downloader/ConcurrentStream.cs b/src/Downloader/ConcurrentStream.cs index 5485e2a..9e95285 100644 --- a/src/Downloader/ConcurrentStream.cs +++ b/src/Downloader/ConcurrentStream.cs @@ -124,15 +124,10 @@ private async Task Watcher() { while (!_watcherCancelSource.IsCancellationRequested) { - // Warning 1: When the Watcher() is here, at the same time Flush() is called, - // then the flush method checks if the queue is not empty, - // wait until will is empty. But, after checking the queue is not empty, - // immediately the below code is executed, and the last packet is consumed. - // So the last wait becomes deadlock! var packet = await _inputBuffer.WaitTryTakeAsync(_watcherCancelSource.Token).ConfigureAwait(false); if (packet != null) { - // Warning 2: When the Watcher() is here, at the same time Flush() is called, + // Warning: When the Watcher() is here, at the same time Flush() is called, // then the Flush method checks if the queue is empty, so break workflow. // but, the stream is not still filled!