Skip to content
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

Drop the GIL while running sync #26

Open
djmitche opened this issue Jan 2, 2025 · 0 comments
Open

Drop the GIL while running sync #26

djmitche opened this issue Jan 2, 2025 · 0 comments

Comments

@djmitche
Copy link
Collaborator

djmitche commented Jan 2, 2025

A sync may take a while, but doesn't touch anything accessible from Python. We could drop the GIL while syncing!

Since Replica is currently not Send (#25), this would be safe: no other thread can call a method on a Replica while the sync is ongoing, since it is using the only thread allowed to do so.

However, if we ever drop that restriction then we'd need to add some other kind of mutual exclusion to ensure the Replica isn't modified while sync is running. So, I'm not sure it's a good idea to drop the GIL just yet.

If someone has a case for doing so, please comment here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant