Skip to content

Instantly share code, notes, and snippets.

@stevejgordon
Created October 14, 2020 08:35
Show Gist options
  • Save stevejgordon/1b4873d112314015ff1cb1b23a6b56cd to your computer and use it in GitHub Desktop.
Save stevejgordon/1b4873d112314015ff1cb1b23a6b56cd to your computer and use it in GitHub Desktop.
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