Skip to content

When to use Python::gil and passing py in the method or function? #4427

Answered by birkenfeld
Abhay2412 asked this question in Questions
Discussion options

You must be logged in to vote

It is not required to have py: Python as a function argument if you don't need it. The GIL will still be held and to release it you'll need to call py.allow_threads() (thereby requiring a py token!)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Abhay2412
Comment options

Answer selected by Abhay2412
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants