Move to thread pool after yield in WaitAllAsync#44514
Move to thread pool after yield in WaitAllAsync#44514sharwell merged 2 commits intodotnet:masterfrom
Conversation
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.
|
@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. |
src/Workspaces/Core/Portable/Shared/TestHooks/YieldAwaitableExtensions.cs
Outdated
Show resolved
Hide resolved
|
@jasonmalinowski ptal :) |
|
Hello @sharwell! Because this pull request has the 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 (
|
| // 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; |
There was a problem hiding this comment.
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.
|
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. |
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.