File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Advanced.Algorithms/Distributed Expand file tree Collapse file tree 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
77 /// <summary>
88 /// A simple asynchronous multi-thread supporting producer/consumer FIFO queue with minimal locking.
99 /// </summary>
10- internal class AsyncQueue < T >
10+ public class AsyncQueue < T >
1111 {
1212 //data queue.
1313 private readonly Queue < T > queue = new Queue < T > ( ) ;
@@ -20,7 +20,7 @@ internal class AsyncQueue<T>
2020 /// Supports multi-threaded producers.
2121 /// Time complexity: O(1).
2222 /// </summary>
23- internal async Task EnqueueAsync ( T value , CancellationToken taskCancellationToken = default ( CancellationToken ) )
23+ public async Task EnqueueAsync ( T value , CancellationToken taskCancellationToken = default ( CancellationToken ) )
2424 {
2525 await consumerQueueLock . WaitAsync ( taskCancellationToken ) ;
2626
@@ -41,7 +41,7 @@ internal class AsyncQueue<T>
4141 /// Supports multi-threaded consumers.
4242 /// Time complexity: O(1).
4343 /// </summary>
44- internal async Task < T > DequeueAsync ( CancellationToken taskCancellationToken = default ( CancellationToken ) )
44+ public async Task < T > DequeueAsync ( CancellationToken taskCancellationToken = default ( CancellationToken ) )
4545 {
4646 await consumerQueueLock . WaitAsync ( taskCancellationToken ) ;
4747
You can’t perform that action at this time.
0 commit comments