Skip to content

gh-159344: Notify ThreadingMock waiters before running side effects - #159345

Draft
esadomer wants to merge 1 commit into
python:mainfrom
esadomer:fix-20261013-12-threadingmock-side-effects
Draft

esadomer wants to merge 1 commit into
python:mainfrom
esadomer:fix-20261013-12-threadingmock-side-effects

Conversation

@esadomer

@esadomer esadomer commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

ThreadingMock records a call before executing its side effect but delays notifying waiters until the side effect returns. Notify them first so a raising or waiting side effect cannot hide a recorded call. Cover both raising side effects and waits made during the side effect.

Fixes #159344.

Validation (Windows debug build): test_unittest passed; both new side-effect regressions failed before the fix. The isolated patch applies cleanly to the base revision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Notify ThreadingMock waiters before running side effects

1 participant