🐇 Implement AsyncQueue<T>.TryDequeueAsync#43440
Conversation
4aac73d to
d6b23fb
Compare
67843f4 to
561f076
Compare
There was a problem hiding this comment.
When the queue is completed with a pending TryDequeueAsync return then [](start = 35, length = 70)
I find this wording confusing, consider rewording.
There was a problem hiding this comment.
I amended the previous commit just to reword this. The difference can be seen in this:
https://github.com/dotnet/roslyn/compare/561f07655fc1c829a0948546691867533051739c..2043e01430be991df037cb94d9f1b4b0fd8713e7
This method uses Optional<T> instead of T for the return value of TryDequeueAsync, allowing the method to support normal termination of the queue without throwing cancellation exceptions.
561f076 to
2043e01
Compare
|
@dotnet/roslyn-compiler for a second review |
|
@gafter can you take a look at this? |
| // the Optional<T> will not have a value. This signals the queue has reached | ||
| // completion and no more items will be added to it. | ||
|
|
||
| // This failure is being tracked by https://github.com/dotnet/roslyn/issues/5962 |
There was a problem hiding this comment.
This failure is being tracked by [](start = 35, length = 32)
This comment appears pretty out of date. Can this assertion be uncommented? At the very least we should have an open issue tracking this potential failure.
There was a problem hiding this comment.
I'll submit this as a follow-up
This method uses
Optional<T>instead ofTfor the return value of TryDequeueAsync, allowing the method to support normal termination of the queue without throwing cancellation exceptions.