Skip to content

Add [Thread.use_domains] to force us into the domains locking mode #4013

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lpw25
Copy link
Collaborator

@lpw25 lpw25 commented May 16, 2025

Currently, you cannot start your first domain from a thread other than the main one. Working around this restriction requires starting a dummy domain on the main thread first. However, this can be harder than it seems because you also can't fork once you've started any domains.

This PR adds a function that avoids this restriction: as long as you call [Thread.use_domains] on the main thread first, you are allowed to start your first domain from any thread you like.

This restriction will go away once we fix the locking scheme. At that point this function should be removed.

@lpw25 lpw25 requested a review from stedolan May 16, 2025 14:54
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.

1 participant