JuliaPy / PyCall.jl

Package to call Python functions from the Julia language
MIT License
1.47k stars 187 forks source link

what does it take for PyCall.jl to drop GIL #1046

Closed Moelf closed 1 year ago

Moelf commented 1 year ago

Numba has a nogil annotation, I'm wondering if we can somehow drop the GIL and what would that imply.

see: https://github.com/JuliaPy/pyjulia/issues/535

stevengj commented 1 year ago

See also https://github.com/JuliaPy/PyCall.jl/issues/882 and https://github.com/cjdoris/PythonCall.jl/issues/108

PallHaraldsson commented 1 year ago

In case relevant, new in 3.12rc1: https://peps.python.org/pep-0684/

PEP 684: A Per-Interpreter GIL Sub-interpreters may now be created with a unique GIL per interpreter. This allows Python programs to take full advantage of multiple CPU cores.

EDIT: Moved long text here to: https://github.com/cjdoris/PythonCall.jl/issues/343

I noticed "closed this as not planned" so discussion likely relevant at PythonCall (not here to not split the discussion), if at all, in case something needs implementing.