-
Notifications
You must be signed in to change notification settings - Fork 776
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
Unify GILGuard and Python #213
Comments
I don’t think this is possible. Also acquire is rare for extensions |
Just to add a datapoint, I use acquire quite a lot in https://github.com/joar/rust-csv-py |
If we remove |
I'd rather like to remove PyToken completely (see #94). For the GILGuard vs. Python story I thought about using things like Deref or a Python type that hides the GILGuard internally, but I haven't found a good design yet. |
I see. |
As recommended in PyO3/pyo3#213 (comment)
I think that most users will use the new As a result I'm going to close this issue, but please shout if anyone thinks this still needs to happen and we can reopen. |
Currently, there a two types:
GILGuard
andPython
, whereGILGuard
carries data and has a Drop implementation, whilePython
is a zero sized marked type. This leads to the following boilerplate all over the code:We should unify those two types, so that we can just write
and then use the
gil
just like thepy
now.The text was updated successfully, but these errors were encountered: