Skip to content

Async-streams: use ManualResetValueTaskSourceCore and AsyncIteratorMethodBuilder types#31330

Merged
jcouv merged 4 commits intodotnet:masterfrom
jcouv:bcl-types
Dec 4, 2018
Merged

Async-streams: use ManualResetValueTaskSourceCore and AsyncIteratorMethodBuilder types#31330
jcouv merged 4 commits intodotnet:masterfrom
jcouv:bcl-types

Conversation

@jcouv
Copy link
Copy Markdown
Member

@jcouv jcouv commented Nov 24, 2018

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 Task instances, since we don't need them for async-iterators), called AsyncIteratorMethodBuilder. It is very similar to AsyncVoidMethodBuilder, but has MoveNext instead of Start and Complete instead of SetResult.

See BCL APIs: dotnet/corefx#33104

@jcouv jcouv added this to the 16.0.P2 milestone Nov 24, 2018
@jcouv jcouv self-assigned this Nov 24, 2018
@jcouv jcouv requested a review from a team as a code owner November 24, 2018 19:57
@jcouv jcouv force-pushed the bcl-types branch 3 times, most recently from 43e9685 to d3de70b Compare November 24, 2018 23:57
@jcouv
Copy link
Copy Markdown
Member Author

jcouv commented Nov 27, 2018

@dotnet/roslyn-compiler for second review. Thanks

1 similar comment
@jcouv
Copy link
Copy Markdown
Member Author

jcouv commented Nov 28, 2018

@dotnet/roslyn-compiler for second review. Thanks

Copy link
Copy Markdown
Member

@agocke agocke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

out TSymbol symbol)
where TSymbol : Symbol
{
if (member == 0)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually don't know what (WellKnownMember)0 is, aside from the default. Is there a name for this member?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. It's System_Math__RoundDouble (looks like we don't have a Default or None)
Some options:

  1. add one,
  2. use -1 as a "no value"
  3. switch to WellKnownMember? member and adjust callers to use null as default value
  4. leave as-is

I'll experiment tonight. Thanks


In reply to: 238452132 [](ancestors = 238452132)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switched to WellKnownMember? approach

@jcouv jcouv merged commit 9dcc089 into dotnet:master Dec 4, 2018
@jcouv jcouv deleted the bcl-types branch December 4, 2018 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants