The GIL protects pythons internal interpreter state, that does not mean that you cannot introduce race conditions of your own as in this example. The job of the GIL is not to ensure that data structures that you choose to use are atomically locked
☝ this. Copying a value, sleeping and then applying it is a logical error, not a data race. No language will protect you from that. Also clickbait title. If you're talking about a vulnerability. Please refer to a (possible) CVE. >.
I see a lot of you are mentioning the clickbait title, I wanted to address this, and apologize. I'm still trying to find a balance when it comes to video packaging, and my titles and thumbnails often change frequently within the first 24 hours after publish. I'll work toward packaging that better represents the contents of the video going forward. I'm sorry it was viewed this way 😔. I take responsibility, and it won't happen again going forward.
@@DanielBoctor The title may be a little sensational but hey, that's youtube for you. I think the video is well produced and covers an interesting topic, I just wanted to add some context :)
@@DanielBoctor I've noticed a number of creators do this and really don't understand the point. Is it simply to bait people who have already watched the video into clicking it again as they think it's something else? Surely that's likely to lead to viewers getting annoyed, ultimately resulting in less viewership?
I am studying this at operating system subject of my career and its very interesting. A single process can have multiple threads and the data can be accesed between threads and thats why without GIL your code can have different results. Multithreading itself is a threat to security due the way it works (if not handled properly). Thats why web browser can't be multithreaded, because that could mean a tab runing one page could acces information on another tab. Thats why browsers use multiproccesing instead, F.E. Firefox creates one proccess per tab (and that is also why JavaScript is singleThread only, not because they are lazy to implement multithreading but because its more secure). Processes are managed by the OS, they can also share information and they are organized in a hierarchy tree (father processes could have sons and so on) But I'm not sure if the OS give each procces its own thread or they are executed in other way.
Can I use AI to make a 24 hour version of this video but replace everything you're saying with some gibberish because its so soothing but packed with crazy good info at the same time. I want this to run in the bg while I work but not get tired of absorbing info / info saturated. Even the bg music choice was so good. Don't appreciate the clickbait tho :/
I appreciate the comment, it means a lot In regards to the clickbait, I apologize 😔I'm still trying to find a balance when it comes to video packaging, and my titles and thumbnails often change frequently within the first 24 hours after publish. I'll work toward packaging that better represents the contents of the video going forward.
If Gil ends up doing nothing and the only thing that prevents race conditions is the operating system, why Gil even exist? Let's let all the task to the os and the code can run 4x faster.
got an ad literally every minute(note this is more than the default rate by about 3 to 4 times) hence Im not watching this despite how interesting it is
I see, thank you! What I found interesting was the python logo in the character. I was surprised thinking that even that logo came up in the generation. I am assuming it was edited later. @@DanielBoctor
Nice video, tho that multiprocessing code is the textbook example of what not to do when you use multiprocessing. I also find your pronunciation of GIL horrific :(
"In fact, it is a mathematical certainty that my CPU will never perform more than 4 operations at once." That's true, but only if you ignore instruction-level parallelism and SIMD.
Answer for your crimes: Why have you created an anime OC for the GIL?
She's his GILfriend.
@@AlexSwanson-rw7cvdeem me speechless 🤣
The GIL protects pythons internal interpreter state, that does not mean that you cannot introduce race conditions of your own as in this example. The job of the GIL is not to ensure that data structures that you choose to use are atomically locked
☝ this. Copying a value, sleeping and then applying it is a logical error, not a data race. No language will protect you from that.
Also clickbait title. If you're talking about a vulnerability. Please refer to a (possible) CVE. >.
I see a lot of you are mentioning the clickbait title, I wanted to address this, and apologize. I'm still trying to find a balance when it comes to video packaging, and my titles and thumbnails often change frequently within the first 24 hours after publish. I'll work toward packaging that better represents the contents of the video going forward.
I'm sorry it was viewed this way 😔. I take responsibility, and it won't happen again going forward.
@@DanielBoctor The title may be a little sensational but hey, that's youtube for you. I think the video is well produced and covers an interesting topic, I just wanted to add some context :)
@@VeryaliveWoW ayyyy thank you for the kind words, I appreciate it!
@@DanielBoctor I've noticed a number of creators do this and really don't understand the point. Is it simply to bait people who have already watched the video into clicking it again as they think it's something else? Surely that's likely to lead to viewers getting annoyed, ultimately resulting in less viewership?
Never know stuff that I thought unrelevant in my Operating System course could have so much potential impact on coding lol
Amazing explanation
the 5ms constant is all you need to add some wildly difficult heisenbugs to your code.
Fascinating thank you
Glad you liked it 😊
1:47 what you did here was so amazing 😭 He just made everything a for loop function in .5 🎉
great video i mean first mistake trying to use multi threading in python if you need speed just use go lmao.
High quality vid, thanks a lot for this!
I'm glad you enjoyed, thank you!
Great video, but where did you get the Python waifu image from?
I generated it with AI lol
background music too loud
I am studying this at operating system subject of my career and its very interesting. A single process can have multiple threads and the data can be accesed between threads and thats why without GIL your code can have different results. Multithreading itself is a threat to security due the way it works (if not handled properly). Thats why web browser can't be multithreaded, because that could mean a tab runing one page could acces information on another tab. Thats why browsers use multiproccesing instead, F.E. Firefox creates one proccess per tab (and that is also why JavaScript is singleThread only, not because they are lazy to implement multithreading but because its more secure).
Processes are managed by the OS, they can also share information and they are organized in a hierarchy tree (father processes could have sons and so on)
But I'm not sure if the OS give each procces its own thread or they are executed in other way.
Love your videos. Hope to see you with a mil+ subscribers one day 🙏🏾
Thank you!!
great video.
i clicked because of the waifu, but still didnt figure out why she is there lol
LOOOOOOOL it's just a play on words because GIL is also a girl's name
Can I use AI to make a 24 hour version of this video but replace everything you're saying with some gibberish because its so soothing but packed with crazy good info at the same time.
I want this to run in the bg while I work but not get tired of absorbing info / info saturated.
Even the bg music choice was so good.
Don't appreciate the clickbait tho :/
I appreciate the comment, it means a lot
In regards to the clickbait, I apologize 😔I'm still trying to find a balance when it comes to video packaging, and my titles and thumbnails often change frequently within the first 24 hours after publish. I'll work toward packaging that better represents the contents of the video going forward.
If Gil ends up doing nothing and the only thing that prevents race conditions is the operating system, why Gil even exist? Let's let all the task to the os and the code can run 4x faster.
Rewrite it in rust 🎉
got an ad literally every minute(note this is more than the default rate by about 3 to 4 times) hence Im not watching this despite how interesting it is
What did you use to create that blue haired character tho at 0:18?
I used an AI image model - specifically live3d.io
Oh thank you, I am quite curious to know the prompt you used. @@DanielBoctor
@@aurkom LOOOOOOL I don't remember the exact one, but it was along the lines of 'blue hair, yellow shirt, blue jacket.......' It was nothing crazy.
I see, thank you! What I found interesting was the python logo in the character. I was surprised thinking that even that logo came up in the generation. I am assuming it was edited later. @@DanielBoctor
@@aurkom oh yeah - I placed that python logo there after the fact, should have mentioned that lol
Your voice is too low compared to the background music volume. Sometimes it's hard to understand what are you talking.
Thank you for pointing this out, I appreciate it. I'll lower it going forward 😊
I am high now
Nice video, tho that multiprocessing code is the textbook example of what not to do when you use multiprocessing. I also find your pronunciation of GIL horrific :(
How so?
"In fact, it is a mathematical certainty that my CPU will never perform more than 4 operations at once."
That's true, but only if you ignore instruction-level parallelism and SIMD.