Skip to content

Add locking for BaseThread start/stop#1155

Draft
nascheme wants to merge 1 commit into
gorakhargosh:masterfrom
nascheme:observer-start-stop-lock
Draft

Add locking for BaseThread start/stop#1155
nascheme wants to merge 1 commit into
gorakhargosh:masterfrom
nascheme:observer-start-stop-lock

Conversation

@nascheme

Copy link
Copy Markdown
Contributor

Use a lock and event to ensure that BaseThread.start() and BaseThread.stop() work reliability when called in different orders or concurrently from different threads.

This should resolve the race reported in #1044. This is not sufficient to allow pytest-run-parallel to pass with the free-threaded build. That will require some additional locking or race condition fixes in addition to this PR.

Use a lock and event to ensure that BaseThread.start() and
BaseThread.stop() work reliability when called in different orders or
concurrently from different threads.
@BoboTiG

BoboTiG commented Feb 20, 2026

Copy link
Copy Markdown
Collaborator

Are you working on it @nascheme? Since the PR is in draft, I didn't merge yet.

@nascheme

Copy link
Copy Markdown
Contributor Author

For now, no I'm not. I'm hoping to get back to working on "watchdog" but that might be a while. So, if someone wants to take over this PR or make their own, feel free.

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.

2 participants