-
Notifications
You must be signed in to change notification settings - Fork 750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial work to support EnumeratorCancellation. #888
Conversation
} | ||
} | ||
|
||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need an #else
with a TypeForwardedTo
here to unify like the rest of the types.
Codecov Report
@@ Coverage Diff @@
## main #888 +/- ##
=======================================
Coverage ? 63.62%
=======================================
Files ? 165
Lines ? 25734
Branches ? 18786
=======================================
Hits ? 16372
Misses ? 2138
Partials ? 7224
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
This is currently blocked on the lack of support for custom attributes on local functions, see dotnet/csharplang#1888. The LDM decision is to add support for these in order to unblock this; see https://github.com/dotnet/csharplang/blob/master/meetings/2019/LDM-2019-04-29.md.
Also note that if we merge this PR, we should consider converting some of these local functions to be |
c374b75
to
a63eb27
Compare
See:
This PR adds the attribute for downlevel platforms, and leverages it for
IAsyncEnumerable<T>
-based iterators where theCreate(Core)
pattern using anIAsyncEnumerator<T>
-based iterator has been used. The result will be reduction of allocations.Goal is to ship with
HAS_ASYNC_ENUMERABLE_CANCELLATION
always set (and hence#if
checks removed). Right now, the flag has to be set explicitly because we don't yet have a compiler drop that picks up on this attribute.When we prepare for the final release in concert with C# 8.0 and .NET Core 3.0 shipping, we'll also revisit the#if USE_ASYNC_ITERATOR
checks; we should be able to get rid of a lot of hand-rolled state machines then.