Fix offload task intermittently not running in MSTest environment.#567
Fix offload task intermittently not running in MSTest environment.#567kalbert312 wants to merge 1 commit intoaspnet:mainfrom
Conversation
|
@dotnet-policy-service agree company="Microsoft" |
| state.Dispose(); | ||
| } | ||
| }); | ||
| }, CancellationToken.None, TaskCreationOptions.DenyChildAttach, TaskScheduler.Default); |
There was a problem hiding this comment.
Should the Task.Factory call inside RequestState.CompleteResponse() also be updated to use TaskScheduler.Default?
There was a problem hiding this comment.
I believe the issue is specific to StartNew with async callbacks, but not certain.
There was a problem hiding this comment.
Did some test debug runs on the minimal repo example. Could not get the non-async delegate usage of StartNew to not run. 😕
|
I noticed this only seems to happen with JetBrains Rider debugger. I cannot seem to reproduce this yet in VS2026. It is a very confusing issue. I opened an issue on their board: https://youtrack.jetbrains.com/issue/RIDER-134081/Debugging-MSTest-4-.NET-Framework-4.7.2-test-hangs-works-in-VS2022 |
Fixes #566