Skip to content

Move to thread pool after yield in WaitAllAsync#44514

Merged
sharwell merged 2 commits intodotnet:masterfrom
sharwell:configure-await
Oct 21, 2020
Merged

Move to thread pool after yield in WaitAllAsync#44514
sharwell merged 2 commits intodotnet:masterfrom
sharwell:configure-await

Conversation

@sharwell
Copy link
Contributor

@sharwell sharwell commented May 22, 2020

This change ensures the main thread is not blocked by high-priority continuations while low priority operations are pending without an explicit event processing action.

@sharwell sharwell requested a review from a team as a code owner May 22, 2020 03:23
This change ensures the main thread is not blocked by high-priority
continuations while low priority operations are pending without an
explicit event processing action.
@sharwell
Copy link
Contributor Author

sharwell commented Jun 9, 2020

@jasonmalinowski for review. I'm still not sure this change in required (the previous "hang" might just have been a normal timeout), but it does seem to be the more correct approach.

@CyrusNajmabadi
Copy link
Contributor

@jasonmalinowski ptal :)

@ghost
Copy link

ghost commented Oct 21, 2020

Hello @sharwell!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Auto-approval

// we need to yield for the scheduler to run inlined tasks. If we are not processing events, we
// switch to the thread pool for the continuations since the yield will only let operations at the
// same or higher priority to execute prior to the continuation.
var continueOnCapturedContext = eventProcessingAction is object;
Copy link
Member

Choose a reason for hiding this comment

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

As discovered in #48825, eventProcessingAction is always null, and so I'm deleting it in that PR. I'm happy to deal with the merge conflict if this goes in first.

@ghost
Copy link

ghost commented Oct 21, 2020

Apologies, I am afraid I am encountering technical difficulties that might have hampered my ability to assist with merging this pull request. I will continue to try to assist if there are further changes to this pull request.

@sharwell sharwell merged commit 0b6ff9b into dotnet:master Oct 21, 2020
@ghost ghost added this to the Next milestone Oct 21, 2020
@sharwell sharwell deleted the configure-await branch October 21, 2020 23:01
@allisonchou allisonchou modified the milestones: Next, 16.9.P2 Nov 24, 2020
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.

6 participants