you said you'll cover the global memory accessing, fixing the issue with block @10:20 but the new video didn't show up? Maybe it's because you're too busy, but it might be helpful if you forgot the put a new video for this one :) BTW, you're an awesome teacher so far bro!!
Dude Tim. You literally taught me threading in python in ten minutes, flawlessly. I am extremely humbled by your thorough understanding and willingness to teach others. Thank you! Your videos are literal gold for autodidactic individuals.
You have a way of making things simple and easy to digest. I watched a few other videos before yours and left with more confusion than when I started. Half way through your video it all clicked. Thanks for the help!!!
i have been struggling with thread for weeks till u suddenly decided to do this tutorial, tyvm bro, u are really helping me to truly understand how python and coding works
Awesome video. I wanted to implement a little threading in a mini project for webscrapping definitions from an online dictionary and this quickly taught me 80% of what I needed.
I wish I had discovered your channel back when I first started programming. Would have saved me months. You talk and instruct just like a college level professor. Easy to understand and you don't digress at all.
Lately I watch and practice practically on my computer along with your video and this has helped me a lot. Your explanation was mind- boggling and your speech is clear. Thanks and keep up the great work.
Thanks a lot, Tim. I've been trying to understand this concept so many times without succeding. Your explanation here together with the theoretical basis given in the previous part gave me a clear picture of how this works and how to implement it in my code. Thanks again, you have a great channel.
For anyone else who finds this, the short answer is yes. The long answer is, you (usually) want to do your multiprocessing from __main__, and then if any of those processes require threading do the threading inside of that process. This is mostly due to the ways you get data out of threads (same process same heap) vs. processes (different process, different heap).
Good work Tim, keep it up. Supporting you forever, learnt a lot from you and expecting much more videos from you. Nice explanation and example. Motivated me a lot. Want more and more "Expert Python Tutorial" and Threading videos. Lots of love from INDIA.
Very very interesting ! Thanks so much for your explanation, you made it crystal clear. Please continue on this serie as much as you can (and also multiprocessing if possible) You're amazing ! Keep up the good work !
I know this might not be appropriate for the target audience, but a good explanation of the GIL, and what that means for threading in particular might be helpful to people expecting more parallel execution of their code (and why async approaches or multiprocessing might be more suitable).
great demonstration, Thanks , I would always use print from each thread to make it clear for me, like in thread #1 , you could print "I am coming from Thread #1" and for thread #2 , you could print "I am coming from Thread #2" and so on
superb explanation understood something with this video after watching n number of other videos Great Tech with Tim always explains well in detail. thanks for teaching us
Great tutorial, Tim and I'm looking forward to the next one in the series. BTW, I noticed that you use both " and ' for strings. Shouldn't a programmer standardize on one? I know they are equivalent, but just for ease, shouldn't you standardize on one? Just curious...
In the example, do the threads stop running after ls is printed? or do the threads continue to run after the print, but we want to see the ls with all of the elements appended to it so we have the .joins
Tim, What is your main programming language? I'm about to start with my first programming language, although I know python. What should I really start with? Please enlighten me. Thanks in advance.
"I'm about to start with my first programming language, although I know python" I wonder what you think python is. Not gonna lie, it actually got me laughing.
@@feliperocha6521 python is like a spoon fed to the software devs. I know it's amazing, but it's laughable at the same time. You need to know a deeper programming language to become more aware of your machine. For example, C++ makes you really aware of your machine and it's operations. Java, on the other hand derives its traits from C++, but it still is not as powerful as C++. C#, one of best programming languages out there, gets you covered in every aspect of software developing.
Any part 3 in the pipeline? I have been doing to threading in a project, but ended up having trouble saving the outputs, as they wrote over each other :(
Hi Tim! Excellent video... I can development an ashyncronate Application. But when I deploy in my docker container... not working.. :( Do you Know, if I need some special config to docker flask app with threading?
Hi Tim. Really enjoying the tutorials. Would it be possible for a new threading video that covers the type of actions a function might do that would cause the cpu to switch threads? In the example you have time.sleep(), but in practise I'm unsure what other types of functions/actions would result in the program jumping between threads.
Are you sure print('ran') will be executed as you've predicted? Isn't It possible that the last line in the code will be executed before? What does the python specification tells about running threads concurrently?
Nice video! Keep up the good work! Do you mind doing some complicated examples where you use queues. Maybe a project like scraping the web to collect news feeds... something like that. With a real world example. Thanks a lot! Have a good one
Thank. I’m wondering if multitasking will solve a problem I have but so far I can’t see a solution. Briefly, I have a window on which a function is running and it’s changing a lot of data on that screen. Then there is a pause button that needs to pause the process. I believe it must be possible; surely it’s normal to have start, stop, pause buttons on a window, but threads don’t seem to be allowed to interact with the same window especially were one thread is doing a lot of window updating. Does that make sense or am I barking up the wrong tree?
2:40 That is incorrect (5,) and (5, None) are not the same The second will have None as second value, the first will be a tuple with only the first value
Hi, I'm new to python and currently learning from scratch. I have this project to automate a system using webdriver & selenium and at the same time, I need to create a screen recording using cv2. My problem is when I apply this threading, the flow of my code is that once automation was done it will execute the screen recording in which I need to do this at the same time. Hope you can help me with this project. Thank you!
Amazing. Thanks a lot! I hope you can produce another vid on multithreading. Loved this one. By the way -- I wanted to donate to you via Brave browser, but couldn't. If you register, I could donate ;)
please help I have a txt file the contains urls to scrape something in each url and print result but whenever I add threads i see that requests prints duplicate results how can I solve that
At 8:30, it’s also interesting to note that the print statement of “Done” was executed before the call to print(i) was finished executing, so both of their new lines are placed on the next line. This is because certain system calls (like I/O for example) cause interrupts at a lower level than the user is programming at (generally). Also, is this series about actually implementing threading (or multi threading) in python, or just a tutorial on how to use the existing module?
If you don't mind, I would like to know the reason of your preference of Sublime Text over VSCode. I understand why you use PyCharm but I don't understand why Sublime Text.
Had some audio issues with the previous upload but seems to be working now! Let me know if there any other *bugs* in the video!
Yea Ik it said Private vid. Love you btw!! Please make a ML from basics video
Oh, I was wondering about that...
That's OK as long as this video works.
Make the next video in this series. I wanna learn more!!
you said you'll cover the global memory accessing, fixing the issue with block @10:20 but the new video didn't show up? Maybe it's because you're too busy, but it might be helpful if you forgot the put a new video for this one :) BTW, you're an awesome teacher so far bro!!
Oh my god, You saved my project thanks a lot! Stay blessed tim
Dude Tim. You literally taught me threading in python in ten minutes, flawlessly. I am extremely humbled by your thorough understanding and willingness to teach others.
Thank you! Your videos are literal gold for autodidactic individuals.
You have a way of making things simple and easy to digest. I watched a few other videos before yours and left with more confusion than when I started. Half way through your video it all clicked. Thanks for the help!!!
i have been struggling with thread for weeks till u suddenly decided to do this tutorial, tyvm bro, u are really helping me to truly understand how python and coding works
Awesome video. I wanted to implement a little threading in a mini project for webscrapping definitions from an online dictionary and this quickly taught me 80% of what I needed.
Sound quality is awesome and loud.
I'm glad you sort it out.
Always supporting you forever.
:)
maaan your explanations are awesome!!! Never seen a simple explanation like this
I wish I had discovered your channel back when I first started programming. Would have saved me months. You talk and instruct just like a college level professor. Easy to understand and you don't digress at all.
Lately I watch and practice practically on my computer along with your video and
this has helped me a lot. Your explanation was mind- boggling and your speech is clear.
Thanks and keep up the great work.
Thanks a lot, Tim. I've been trying to understand this concept so many times without succeding. Your explanation here together with the theoretical basis given in the previous part gave me a clear picture of how this works and how to implement it in my code. Thanks again, you have a great channel.
Wow..
I actually did not think you could explain things this well, not only in this video, but also in the last one...
Big thanks from the heart!
It was a delight watching this tutorial. Nicely explained with a great sequence!
Very good explanation of threads by you Tim. Please keeo up your good work !
great explantaion 👍👍👍
This was the answer to my biggest problem in my program, Thank you!
Could you do multiprocessing as well after threading? Thank you!
For anyone else who finds this, the short answer is yes. The long answer is, you (usually) want to do your multiprocessing from __main__, and then if any of those processes require threading do the threading inside of that process. This is mostly due to the ways you get data out of threads (same process same heap) vs. processes (different process, different heap).
This is a really solid explination, nicely done.
Good work Tim, keep it up. Supporting you forever, learnt a lot from you and expecting much more videos from you. Nice explanation and example. Motivated me a lot. Want more and more "Expert Python Tutorial" and Threading videos. Lots of love from INDIA.
Very very interesting ! Thanks so much for your explanation, you made it crystal clear.
Please continue on this serie as much as you can (and also multiprocessing if possible)
You're amazing ! Keep up the good work !
I know this might not be appropriate for the target audience, but a good explanation of the GIL, and what that means for threading in particular might be helpful to people expecting more parallel execution of their code (and why async approaches or multiprocessing might be more suitable).
great demonstration, Thanks , I would always use print from each thread to make it clear for me, like in thread #1 , you could print "I am coming from Thread #1" and for thread #2 , you could print "I am coming from Thread #2" and so on
Perfect vid, tim gave the explanation plus the examples i needed
massive thank you my man, helped me understand and execute the basics of threading!
Thank you! Very well explained! Understood you much better than literature on my native language
Is there a third video coming out for this? I don't see it in the playlist...
I guess the third part never came.. Would be good though.
There will be lots more coming I hope 🤞
superb explanation understood something with this video after watching n number of other videos Great Tech with Tim always explains well in detail. thanks for teaching us
Bravo!! Ut theoretical and practical makes a lot clear
Just amazing... please bring out the next video soon.
Tim how to pause and resume a thread ? Thanks man
Can't wait for the next video!
Great video Tim. You need to make more threading and multiprocess videos.
I am really thankful to you Sir for these informative videos on channel.
Dude, your tutorial is awsome
excellent content! straight to the point. enormously useful.
Wanna push like button but four 6 in a row under this video don't let me do it :))
p.s.
Amazing video! Big thanks!
I noticed that you somehow missed to use function count2 in the flow. That's why it got confusing.
Thank you Tim!! Really helpful
Very nice presentation on this topic. Thanks so much.
Great tutorial, Tim and I'm looking forward to the next one in the series. BTW, I noticed that you use both " and ' for strings. Shouldn't a programmer standardize on one? I know they are equivalent, but just for ease, shouldn't you standardize on one? Just curious...
I didn't even notice lol
Thanks so much, you're making it so easy to understand
which keyboard do you use?
11:25 Both of your threads(x and y) are targeted to function count. Is this what you meant or was it your fault??
Your coding is swift.
Thanks Tim🥰💥💥💥
really wish there were more of these!
hey just asking when will the next video about threading come out? thanks a lot for doing these tutorials
Your video is Super Awesome!!! Thank you!!
Thanks for the tutorial all could you possibly go over multithreaded socket programming later on in the series?
11:42 You can try time.sleep(5) you sleep the main thread for 5 seconds and then you get desired output.
You could get away with that here, but in practical scenarios you won't know how much time the other threads take, so it's better to use join.
Thank you very much! That video help me to solve a big problem in my code
Great video!
Hey Tim, thanks for the great tutorial.
Great stuff. Thanks!
first! After 3 try, finally got it.
Yep! Finally lol
@@TechWithTim Keep good work, Tim. I learn alot from your videos!
AttributeError: partially initialized module 'threading' has no attribute 'Thread' (most likely due to a circular import).....What does this mean?
Very helpful! Thanks!
Tim - you're a great teacher, love how you explain stuff and really break it down. 👍👍👍👍
In the example, do the threads stop running after ls is printed? or do the threads continue to run after the print, but we want to see the ls with all of the elements appended to it so we have the .joins
Tim, What is your main programming language? I'm about to start with my first programming language, although I know python. What should I really start with? Please enlighten me. Thanks in advance.
Same question... @Tim
"I'm about to start with my first programming language, although I know python" I wonder what you think python is. Not gonna lie, it actually got me laughing.
@@feliperocha6521 bruhh
@@feliperocha6521 python is like a spoon fed to the software devs. I know it's amazing, but it's laughable at the same time. You need to know a deeper programming language to become more aware of your machine. For example, C++ makes you really aware of your machine and it's operations. Java, on the other hand derives its traits from C++, but it still is not as powerful as C++. C#, one of best programming languages out there, gets you covered in every aspect of software developing.
@@azurnxo2134 i disagree.
please cover all topic related to multiprocessing and multithreading
Nice one. Thanks a lot
hey pls continue this series
Will you talk about Semaphores ?
Any part 3 in the pipeline?
I have been doing to threading in a project, but ended up having trouble saving the outputs, as they wrote over each other :(
Hi Tim!
Excellent video... I can development an ashyncronate Application. But when I deploy in my docker container... not working.. :(
Do you Know, if I need some special config to docker flask app with threading?
Hi Tim. Really enjoying the tutorials.
Would it be possible for a new threading video that covers the type of actions a function might do that would cause the cpu to switch threads?
In the example you have time.sleep(), but in practise I'm unsure what other types of functions/actions would result in the program jumping between threads.
Amazing! thank you
What was this 12:58 ?
I started looking around me..!
thank you sir for you video very good waiting for new video :)
Are you sure print('ran') will be executed as you've predicted? Isn't It possible that the last line in the code will be executed before? What does the python specification tells about running threads concurrently?
What is the logic of using _ in for loop? Could you plz explain or share some reference link?
Excellent guide Tim! Just one question, how do you return a value from a thread and use it in the main thread?
Nice video! Keep up the good work! Do you mind doing some complicated examples where you use queues. Maybe a project like scraping the web to collect news feeds... something like that. With a real world example. Thanks a lot! Have a good one
How your sublime text editor gives preference of keywords. Would you tell the settings
well done!
6:30 how is 2 printed on same line as run?
Thank. I’m wondering if multitasking will solve a problem I have but so far I can’t see a solution. Briefly, I have a window on which a function is running and it’s changing a lot of data on that screen. Then there is a pause button that needs to pause the process. I believe it must be possible; surely it’s normal to have start, stop, pause buttons on a window, but threads don’t seem to be allowed to interact with the same window especially were one thread is doing a lot of window updating. Does that make sense or am I barking up the wrong tree?
2:40
That is incorrect
(5,) and (5, None) are not the same
The second will have None as second value, the first will be a tuple with only the first value
why we need count2 when you never run it after 10:09 ?
Hi, I'm new to python and currently learning from scratch. I have this project to automate a system using webdriver & selenium and at the same time, I need to create a screen recording using cv2. My problem is when I apply this threading, the flow of my code is that once automation was done it will execute the screen recording in which I need to do this at the same time. Hope you can help me with this project. Thank you!
ThNks Shelton!
You had target=count in both threads, so the count2 function is pretty much useless no?
thank you very much💗
Is there any way to view all the running threads in Pycharm?
while trying to import threading i keep getting a Not Implemented Error. How do i fix this?
Hi bro I have question this threads how can use in pyqt5 when I click button ?? Can you show us a example?
4:20 For me it prints the number first, and then "ran", and "done"
Amazing. Thanks a lot! I hope you can produce another vid on multithreading. Loved this one.
By the way -- I wanted to donate to you via Brave browser, but couldn't. If you register, I could donate ;)
I think you probably wanted the y-thread to use count2. But as count and count2 are identical it makes no difference. So why create count2?
please help I have a txt file the contains urls to scrape something in each url and print result but whenever I add threads i see that requests prints duplicate results how can I solve that
in somenext tutorial I hope you get to using variable of thread "x" inside thread "y"
How do you spawn new thread without assigning variable to it? (Or automatically assigning variable)
nice video
you are the best
Why you never use autocomplete?
At 8:30, it’s also interesting to note that the print statement of “Done” was executed before the call to print(i) was finished executing, so both of their new lines are placed on the next line. This is because certain system calls (like I/O for example) cause interrupts at a lower level than the user is programming at (generally).
Also, is this series about actually implementing threading (or multi threading) in python, or just a tutorial on how to use the existing module?
Hey Tim, being following you for a while and most say you sir are doing a great job! Is there any we to contact you ?
you can join his discord
If you don't mind, I would like to know the reason of your preference of Sublime Text over VSCode. I understand why you use PyCharm but I don't understand why Sublime Text.
it's lite and simplier then VSCode
@MaxDeveloper I have used Vim but never managed to configure it fir autocompletion
Good plZ try neural nets
11:42
awesome....