Skip to content

Commit a23d6b2

Browse files
Comment touches
1 parent 8a46f95 commit a23d6b2

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

projects/client/RabbitMQ.Client/src/util/AsyncConcurrentQueue.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,13 @@
4646
namespace RabbitMQ.Util
4747
{
4848
/// <summary>
49-
/// A concurrent queue where Dequeue waits for something to be inserted if the queue is empty and Enqueue signals
50-
/// that something has been added. Similar in function to a BlockingCollection but with async/await
51-
/// support.
49+
/// A concurrent queue where Dequeue waits for something to be added if the queue is empty and Enqueue signals
50+
/// that something has been added. Similar in function to a BlockingCollection but with async/await
51+
/// support.
5252
/// </summary>
53-
/// <typeparam name="T"></typeparam>
53+
/// <typeparam name="T">
54+
/// Queue element type
55+
/// </typeparam>
5456
internal class AsyncConcurrentQueue<T>
5557
{
5658
private readonly ConcurrentQueue<T> _internalQueue = new ConcurrentQueue<T>();
@@ -67,7 +69,7 @@ public async Task<T> DequeueAsync(CancellationToken token = default)
6769

6870
if (!_internalQueue.TryDequeue(out var command))
6971
{
70-
throw new InvalidOperationException("Internal queue empty despite signaled enqueue.");
72+
throw new InvalidOperationException("Internal queue is empty despite receiving an enqueueing signal");
7173
}
7274

7375
return command;

0 commit comments

Comments
 (0)