File tree 1 file changed +3
-3
lines changed
Advanced.Algorithms/Distributed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ namespace Advanced.Algorithms.Distributed
7
7
/// <summary>
8
8
/// A simple asynchronous multi-thread supporting producer/consumer FIFO queue with minimal locking.
9
9
/// </summary>
10
- internal class AsyncQueue < T >
10
+ public class AsyncQueue < T >
11
11
{
12
12
//data queue.
13
13
private readonly Queue < T > queue = new Queue < T > ( ) ;
@@ -20,7 +20,7 @@ internal class AsyncQueue<T>
20
20
/// Supports multi-threaded producers.
21
21
/// Time complexity: O(1).
22
22
/// </summary>
23
- internal async Task EnqueueAsync ( T value , CancellationToken taskCancellationToken = default ( CancellationToken ) )
23
+ public async Task EnqueueAsync ( T value , CancellationToken taskCancellationToken = default ( CancellationToken ) )
24
24
{
25
25
await consumerQueueLock . WaitAsync ( taskCancellationToken ) ;
26
26
@@ -41,7 +41,7 @@ internal class AsyncQueue<T>
41
41
/// Supports multi-threaded consumers.
42
42
/// Time complexity: O(1).
43
43
/// </summary>
44
- internal async Task < T > DequeueAsync ( CancellationToken taskCancellationToken = default ( CancellationToken ) )
44
+ public async Task < T > DequeueAsync ( CancellationToken taskCancellationToken = default ( CancellationToken ) )
45
45
{
46
46
await consumerQueueLock . WaitAsync ( taskCancellationToken ) ;
47
47
You can’t perform that action at this time.
0 commit comments