why remove the python GIL? (intermediate - advanced) anthony explains
HTML-код
- Опубликовано: 10 фев 2025
- today we talk about the "global interpreter lock" in python and why it currently limits multithreading to 100% usage (and what could be done if it were lifted)
nogil project: docs.google.co... github.com/col...
playlist: • anthony explains
==========
twitch: / anthonywritescode
dicsord: / discord
twitter: / codewithanthony
github: github.com/aso...
stream github: github.com/ant...
I won't ask for subscriptions / likes / comments in videos but it really helps the channel. If you have any suggestions or things you'd like to see please comment below!
Kickass explanation! What I am looking for is some good examples where we are stuck due to GIL but using the java implementation of python Jpython the issue got resolved
Interesting, high level content. Thnx for sharing
Removing my grandma in law ? Never thought about it 🤔 could make my python's programming performance increase indeed
Since we’re on the topic I think it would be also good to explain the differences with async python
planned at some point!
I am thankful for this, what an amazing way to explain this topic.
requirement for multy threaded applications in python is limited.
This defect of single thread runing at a time even if we write multi threaded apps is overshadowed by having varity of modules in python.
multithreading might not be necessary most of the time and if needed could be over come by writing a rust class and wrapping it with python for speed.
We need an update/follow up video now :D
thank you!!
With the new pep getting a lot of buzz, I was looking for an explanation and this was great!
That was informative, thanks. I think asyncio would be a good complement to this topic.
Thank You
Could you give a few real world examples of where multithreading would actually be useful in the current state of Python? Thanks for the video!
depends... any place where you'd want to do any sort of parallel processing
IO operations: file IO, http requests, etc.
@@fiancheg The GIL doesn't lock IO-bound threads. The main advantage of a nogil would be to CPU-bound parallel threads.
Have that a bunch with software that connect different sensors and actors to run complex processes. The threads wait for sensor / system input and change the system or the actor state accordingly. In between there are short sleep cycles after which each thread polls for new data / state change
Okay, it was quite noticeable and I have to ask: why don't you call it the "gill"?
better for visually impaired (captions) and it reduces ambiguity
Nice One. is there any reason why you are not using autocompletion ?
I haven't implemented it yet
LOL you should really know by now that Anthony doesn’t need auto completion…
He's using an editor he made himself called babi
So using one thread in your pool, implies that your work is running serially right?
a ThreadPool of size 1 would still allow work to happen in the main thread as well (main + 1 background thread) -- but also wouldn't be too terribly useful