The GIL Is DEAD: Python's Is NOW Multithreaded

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Jython doesn't support Python v3 yet, and from the looks of it I wouldn't hold my breath waiting. If you want python on the JVM there is GraalVM, which allows python to be compiled to JVM bytecode or even JIT compiled at runtime to run on the GraalVM, and the GraalVM basically JIT compiles to native code. So it's actually considerably better than Jython ever was, or likely ever will be. Graal is of course a Oracle project, so that might be a non-starter for some. Anyway, just wanted to point out that Jython isn't really a good option these days.

ovrclcked
Автор

Love love love the videos, here after the sockets video.

Again, this is something I knew already but enjoyed watching anyway. I am going beyond just subscribing — let me send your channel over to my friends.

mayankdebnath
Автор

asyncio is generator-based (yield keyword) and thus has the same limitations as threads.

shenlongultra
Автор

When I first learnt about the GIL and CPython, it was a big lesson for me in why it's important to limit exposure of implementation details to external systems. Because if not for how Python exposed its internals to C modules, Python's speed issues would have been solved ages ago

yewo.m
Автор

Asyncio isn’t really a workaround to avoid issues with the GIL. Just like the default MT implementation it’s meant to allow for your code to do other work while waiting on io, but it still respects the gil.

MikeGaruccio
Автор

Before free-threading (3.13) you should have probably managed subinterpreters, the feature allowing one GIL per thread as of 3.12 (if I remember right?), that enables shared memory while resembling multiprocessing.

marcoronzani
Автор

first video of the year 🎉
amazing vid, can’t wait what else u got in store for us

debbie
Автор

Nice overview and thank you for "embedded" subtitles

antonkot
Автор

Hmm... I do a lotta work in Kivy, and one of the most annoying things (especially now when an average smart phone has multiple cores). Python's multiprocessor module, sadly, isn't compatible with the Android ecosystem. During the build process, Buildozer also compiles a copy of Python into the apk. Gonna try setting the no gil flag, this video might have just provided me with a wonderful solution, thank you.

SorFig
Автор

Great content and very informative just reviewed <3 Happy Holidays !

Kevencebazile
Автор

Title and picture are click-baiting. Python has only an experimental feature to disable GIL. No one will use this in production until is ready for consume.

Ace-obyk
Автор

multithreaded cpython still has to respect the gil

eldebtor
Автор

Genuine questions for the people that actually needed this explanation. 1. What does this mean for security things? 2. How is this faster than using options 1 or 2 maybe even 3 that you covered? 3. NumPy doing stuff in c outside of the GIL.. was that just as risky doing no GIL in python anyway? And therefore there might not be any performance gains of python 3.13+ vs libraries just that libs might not be needed?

Really good explanations here of something I never quite understood because python generally "known" as the data analysis go-to and I assumed it was just because it was easier to implement without too much efficiency loss. I didn't realize that things like NumPy were doing stuff in c outside of the GIL..

No_This.IsPatrick
Автор

I still wonder how C# managed to deal with all of that (it has a background GC thread), and why scripting languages struggle with parallelism.

Python is still my favorite language for university assignments, and sometimes i ran into the problems with threading.

Gameplayer
Автор

Still slow as fuck (and Go is slow too if you write HPC code, far behind C#)

neonmidnight
Автор

The whole beauty of garbage collection is not being bound to its implementation. Python should remove the GIL and use better GC algorithms than ref counting which is known to be lame.

There are so many better options out there.

acasualviewer
Автор

Lots of Linux distros have yet to upgrade their official Pythons to 3.13, for some reason.

rodneylives
Автор

I have no idea why Devs are excited about creating yet another shared memory nightmare with multi threading, but this time in Python.

Async and multiprocessing are perfectly fine and superior solutions to concurrency and parallelism.

Автор

how is mojo compared to python can it replace python

ulrich-tonmoy
Автор

Ouh i didnt knw numpy and tensorflow were not using GIL

SSJwalker
visit shbcf.ru