Skip to content

[release/10.0] Remove racy BackgroundWorker cancellation assertion - #138103

Merged
lewing merged 1 commit into
release/10.0from
backport/pr-136427-to-release/10.0
Nov 23, 2026
Merged

lewing merged 1 commit into
release/10.0from
backport/pr-136427-to-release/10.0

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Backport of #136427 to release/10.0

/cc @lewing @copilot

Customer Impact

  • Customer reported
  • Found internally

[Select one or both of the boxes. Describe how this issue impacts customers, citing the expected and actual behaviors and scope of the issue. If customer-reported, provide the issue number.]

Regression

  • Yes
  • No

[If yes, specify when the regression was introduced. Provide the PR or commit if known.]

Testing

[How was the fix verified? How was the issue missed previously? What tests were added?]

Risk

[High/Medium/Low. Justify the indication by mentioning how risks were measured and addressed.]

`TestCancelAsync` could fail when it read `IsBusy` and
`CancellationPending` during worker completion, even though cancellation
had been observed.

- **Change:** Remove the unreliable main-thread state check; retain the
worker-side cancellation check.

<!-- START COPILOT CODING AGENT SUFFIX -->

- Fixes #133328

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: jkotas <[email protected]>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@lewing lewing added the test-bug Problem in test source code (most likely) label Nov 23, 2026
@lewing
lewing self-requested a review November 23, 2026 04:10
@lewing lewing added the Servicing-approved Approved for servicing release label Nov 23, 2026
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

@lewing
lewing enabled auto-merge (squash) November 23, 2026 04:11
@lewing lewing self-assigned this Nov 23, 2026
@lewing
lewing merged commit e35e741 into release/10.0 Nov 23, 2026
114 of 116 checks passed
@lewing
lewing deleted the backport/pr-136427-to-release/10.0 branch November 23, 2026 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-Infrastructure Servicing-approved Approved for servicing release test-bug Problem in test source code (most likely)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants