Skip to content

Fix CancellationTokenSource_CancelAsync_AllCallbacksInvoked test#82153

Merged
stephentoub merged 1 commit into
dotnet:mainfrom
stephentoub:fixcancelasynctest
Feb 15, 2023
Merged

Fix CancellationTokenSource_CancelAsync_AllCallbacksInvoked test#82153
stephentoub merged 1 commit into
dotnet:mainfrom
stephentoub:fixcancelasynctest

Conversation

@stephentoub

Copy link
Copy Markdown
Member

If the task internally queued by CancelAsync hasn't started yet by the time we block waiting for it, Wait could inline it and end up running it on the current thread.

Fixes #82140

If the task internally queued by CancelAsync hasn't started yet by the time we block waiting for it, Wait could inline it and end up running it on the current thread.
@ghost ghost assigned stephentoub Feb 15, 2023
@ghost

ghost commented Feb 15, 2023

Copy link
Copy Markdown

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

Issue Details

If the task internally queued by CancelAsync hasn't started yet by the time we block waiting for it, Wait could inline it and end up running it on the current thread.

Fixes #82140

Author: stephentoub
Assignees: -
Labels:

area-System.Threading

Milestone: -

@stephentoub stephentoub merged commit db6a5f5 into dotnet:main Feb 15, 2023
@stephentoub stephentoub deleted the fixcancelasynctest branch February 15, 2023 16:13
@ghost ghost locked as resolved and limited conversation to collaborators Mar 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test failure System.Threading.Tasks.Tests.CancellationTokenTests.CancellationTokenSource_CancelAsync_AllCallbacksInvoked

2 participants