Created
October 14, 2020 08:35
-
-
Save stevejgordon/1b4873d112314015ff1cb1b23a6b56cd 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
UnboundedChannel<T> parent = _parent; | |
lock (parent.SyncObj) | |
{ | |
parent.AssertInvariants(); | |
// Try again to read now that we're synchronized with writers. | |
if (!parent._items.IsEmpty) | |
{ | |
return new ValueTask<bool>(true); | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment