# multithreading = Used to perform multiple tasks concurrently (multitasking) # Good for I/O bound tasks like reading files or fetching data from APIs import threading import time def walk_dog(first, last): time.sleep(8) print(f"You finish walking {first} {last}") def take_out_trash(): time.sleep(2) print("You take out the trash") def get_mail(): time.sleep(4) print("You get the mail") chore1 = threading.Thread(target=walk_dog, args=("Scooby", "Doo")) chore1.start() chore2 = threading.Thread(target=take_out_trash) chore2.start() chore3 = threading.Thread(target=get_mail) chore3.start() # .join() ensures that all tasks are completed before proceeding chore1.join() chore2.join() chore3.join() print("All chores are complete!")
@mxfze6 ай бұрын
bro taught me in 8 minutes what a year of school could not 🗿
@RoyZennet5 ай бұрын
LMAOOOOO SAME DUDE
@rola8798Ай бұрын
what school did you go to bro?
@lucidd_64646 ай бұрын
Almost at 2 Million! 🎉 I have watched your HTML/CSS course and I learned in about 4 days. I am now making websites for people and they are amazed by them. I am also learning C++ and it is going well because of you. Thank you for opening up this possible future for me and making my dreams come true! Thank you Bro!
@abdulfataishorunke824110 күн бұрын
concise and precise video. Thump up!
@JoshuaB864 ай бұрын
Great explanation & demo. I wish this was available when I first learned threading.
@faatemehch963 ай бұрын
The best video for threading. Thank you 👍
@SamAlizadeh-w6eАй бұрын
The way that you explain is awesome🤩
@penjaninyirenda94544 ай бұрын
Thank you! I was having trouble understanding this but you made it so easy👍
@WorkBob-m5h5 ай бұрын
Very well presented! Thank you.
@jeevan765723 күн бұрын
Thank you so much for the lecture 😊
@animetime30206 ай бұрын
Great Bro. It would be great help if you could make a tutorial on regular expression as well.
@huyne_info14 күн бұрын
Thank you so much Bro!!!
@uzairzarry86916 ай бұрын
Great explanation
@Remesayy6 ай бұрын
Thanks for the video
@wyr296 ай бұрын
hello chad , please make tutorials on data structure and algorithms in c++ ,
@yesiam60516 ай бұрын
Exactly what I needed!
@robert-qn8hy6 ай бұрын
Thanks a lot ...can you also make a tutorial on python asynchronous programming
@onehmong9368Ай бұрын
Very nice Bro Code youre truly a bro. ascynio???
@vaibhavmaniar15972 ай бұрын
What about multi-threading in multi-core CPU systems? In the case of multi-core CPU systems, multiple threads can run their tasks parallelly. Is that Python not capable enough to run multiple tasks parallelly?
@YoruAmeHD6 ай бұрын
i get error of no attribute 'Thread'(most likely due to a circular import) any help?
@coder_09_Ай бұрын
Whats the difference between async and threadin
@marktsh6 ай бұрын
Please make full course about Rust 🙏
@d-day6718 күн бұрын
How many threads are possible?
@layfonkolar1086 ай бұрын
Bro can you please use ui with a pop out color to see clearly
@robert-qn8hy6 ай бұрын
Bro can you please a make video on python daemon threads please...
@СараЕркінбаева6 ай бұрын
What laptop do you use for it?
@angelnoyola48306 ай бұрын
Hey man I have a question I am 20 years old I feel like I would be going in way to late into the industry of engineering so would like some advice if you could, if you were to restart how would you do it with todays economy would you still look for a bootcamp and go with that or go a different route, like for me I was thinking I could go to college for 2 years as an engineer which would be an associates just to build the resume and after that go into a bootcamp
@angelnoyola48306 ай бұрын
Or do any of yall recommend a bootcamp? Please I would love to know
@TechTalk8706 ай бұрын
I'm very interested if you could make an AI course 😊😇
@Un_revealing6 ай бұрын
I always wondered Y can't I just pass args Turns out it needs to be represented as tuple Thanks now I don't need to create wrapper functions, 🙃🙃
@benjmeistah3 ай бұрын
dud, ffs please carry my unborn children! Thank You so much :D
@akulalokesh68666 ай бұрын
hii bro
@rambogt_r2 ай бұрын
could you please create a multiprocessing like i/o and cpu operation in python parallelly