Created
October 14, 2020 08:32
-
-
Save stevejgordon/d224dedd7f68a0859e9bada8f4dcce6a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override bool TryRead([MaybeNullWhen(false)] out T item) | |
{ | |
UnboundedChannel<T> parent = _parent; | |
// Dequeue an item if we can | |
if (parent._items.TryDequeue(out item)) | |
{ | |
CompleteIfDone(parent); | |
return true; | |
} | |
item = default; | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment