Skip to content

Instantly share code, notes, and snippets.

@stevejgordon
Created October 14, 2020 08:37
Show Gist options
  • Save stevejgordon/e232d3ef516da20fe92bb584f5efa0d8 to your computer and use it in GitHub Desktop.
Save stevejgordon/e232d3ef516da20fe92bb584f5efa0d8 to your computer and use it in GitHub Desktop.
if (!cancellationToken.CanBeCanceled)
{
AsyncOperation<bool> singleton = _waiterSingleton;
if (singleton.TryOwnAndReset())
{
ChannelUtilities.QueueWaiter(ref parent._waitingReadersTail, singleton);
return singleton.ValueTaskOfT;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment