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

[Runtime] Use GIL lock in the runtime instead of custom mutexes. #624

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

erick-xanadu
Copy link
Contributor

@erick-xanadu erick-xanadu commented Mar 21, 2024

Context: We have a custom mutex that denotes current use of the Python interpreter (a shared resource among threads). This custom mutex may be replaced by the lock found in pybind11.

Description of the Change: Use the scope acquire lock.

Benefits: No custom mutex, better DX with third party libraries. (No need to determine location of the mutex library).

Possible Drawbacks:

Related GitHub Issues:

@erick-xanadu erick-xanadu added reviewer:require-wheels Pull Requests will need wheel building job successful before being merged author:build-wheels Run the wheel building workflows on this Pull Request labels Mar 21, 2024
@maliasadi
Copy link
Member

🙌

@maliasadi maliasadi self-requested a review March 21, 2024 21:19
@erick-xanadu
Copy link
Contributor Author

@maliasadi still under construction 😅

@erick-xanadu erick-xanadu force-pushed the eochoa/2024-03-21/locks branch 3 times, most recently from a2c5a51 to 19d8056 Compare March 21, 2024 21:49
@maliasadi
Copy link
Member

I know.. I just got too excited 😅

@dime10
Copy link
Collaborator

dime10 commented Jul 12, 2024

@erick-xanadu This seemed like a good thing, any chance we can still land this?

@erick-xanadu
Copy link
Contributor Author

@erick-xanadu This seemed like a good thing, any chance we can still land this?

@dime10, needs some more investigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author:build-wheels Run the wheel building workflows on this Pull Request reviewer:require-wheels Pull Requests will need wheel building job successful before being merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants