Async-streams: use ManualResetValueTaskSourceCore and AsyncIteratorMethodBuilder types#31330
Merged
jcouv merged 4 commits intodotnet:masterfrom Dec 4, 2018
Merged
Async-streams: use ManualResetValueTaskSourceCore and AsyncIteratorMethodBuilder types#31330jcouv merged 4 commits intodotnet:masterfrom
jcouv merged 4 commits intodotnet:masterfrom
Conversation
43e9685 to
d3de70b
Compare
cston
approved these changes
Nov 26, 2018
Member
Author
|
@dotnet/roslyn-compiler for second review. Thanks |
1 similar comment
Member
Author
|
@dotnet/roslyn-compiler for second review. Thanks |
agocke
approved these changes
Dec 3, 2018
| out TSymbol symbol) | ||
| where TSymbol : Symbol | ||
| { | ||
| if (member == 0) |
Member
There was a problem hiding this comment.
I actually don't know what (WellKnownMember)0 is, aside from the default. Is there a name for this member?
Member
Author
There was a problem hiding this comment.
Good question. It's System_Math__RoundDouble (looks like we don't have a Default or None)
Some options:
- add one,
- use -1 as a "no value"
- switch to
WellKnownMember? memberand adjust callers to usenullas default value - leave as-is
I'll experiment tonight. Thanks
In reply to: 238452132 [](ancestors = 238452132)
Member
Author
There was a problem hiding this comment.
Switched to WellKnownMember? approach
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The feature was developed using a slightly different helper (ManualResetValueTaskSourceLogic, which depended on IStrongBox). THe BCL added ManualResetValueTaskSourceCore instead, which is largely the same API, except that it no longer needs IStrongBox.
Also, the BCL will be adding a builder type (which does not allocate
Taskinstances, since we don't need them for async-iterators), calledAsyncIteratorMethodBuilder. It is very similar toAsyncVoidMethodBuilder, but hasMoveNextinstead ofStartandCompleteinstead ofSetResult.See BCL APIs: dotnet/corefx#33104