CPython PR merged yesterday: Allow disabling the GIL with `PYTHON_GIL=0` or `-X gil=0` by swtaarrs · Pull Request #116338 (part of PEP 703) (github.com)
from MoreCoffee@programming.dev to python@programming.dev on 13 Mar 2024 17:30
https://programming.dev/post/11406534

cross-posted from: lemmy.ml/post/13079957

peps.python.org/pep-0703/

#python

threaded - newest

troyunrau@lemmy.ca on 13 Mar 2024 17:37 next collapse

Threading intensifies

I’m excited about this, even if it is just baby steps. It’s been one of my very few complaints about python, having spent two decades using it.

I’m hoping that pyside and QThreads can be made to work with noGIL. That would be super sweet. :)

wise_pancake@lemmy.ca on 13 Mar 2024 18:47 next collapse

Fuck Gil, he’s always slowing down my Python programs.

sik0fewl@lemmy.ca on 14 Mar 2024 03:00 collapse

Well Ol Gil’s gonna surprise you. I’ll make something of myself, you’ll see!

veroxii@aussie.zone on 13 Mar 2024 23:08 next collapse

Straight to production!

SatouKazuma@lemmy.world on 14 Mar 2024 02:56 collapse

LGTM!

sugar_in_your_tea@sh.itjust.works on 14 Mar 2024 05:59 collapse

modeler@lemmy.world on 14 Mar 2024 04:23 collapse

Note the caveat:

With PYTHON_GIL=0 set, I spot-checked a few tests and small programs that don’t use threads. They all seem to run fine, and very basic threaded programs work, sometimes. Trying to run the full test suite crashes pretty quickly, in test_asyncio