Learn Python MULTITHREADING in 8 minutes! 🧵

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ต.ค. 2024

ความคิดเห็น • 25

  • @BroCodez
    @BroCodez  3 หลายเดือนก่อน +5

    # 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!")

  • @mxfze
    @mxfze 3 หลายเดือนก่อน +20

    bro taught me in 8 minutes what a year of school could not 🗿

    • @RoyZennet
      @RoyZennet 2 หลายเดือนก่อน

      LMAOOOOO SAME DUDE

  • @JoshuaB86
    @JoshuaB86 หลายเดือนก่อน +1

    Great explanation & demo. I wish this was available when I first learned threading.

  • @lucidd_6464
    @lucidd_6464 3 หลายเดือนก่อน +3

    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!

  • @faatemehch96
    @faatemehch96 20 วันที่ผ่านมา

    The best video for threading. Thank you 👍

  • @penjaninyirenda9454
    @penjaninyirenda9454 หลายเดือนก่อน

    Thank you! I was having trouble understanding this but you made it so easy👍

  • @WorkBob-m5h
    @WorkBob-m5h 2 หลายเดือนก่อน

    Very well presented! Thank you.

  • @animetime3020
    @animetime3020 3 หลายเดือนก่อน

    Great Bro.
    It would be great help if you could make a tutorial on regular expression as well.

  • @wyr29
    @wyr29 3 หลายเดือนก่อน +1

    hello chad ,
    please make tutorials on data structure and algorithms in c++ ,

  • @yesiam6051
    @yesiam6051 3 หลายเดือนก่อน

    Exactly what I needed!

  • @robert-qn8hy
    @robert-qn8hy 3 หลายเดือนก่อน

    Thanks a lot ...can you also make a tutorial on python asynchronous programming

  • @marktsh
    @marktsh 3 หลายเดือนก่อน

    Please make full course about Rust 🙏

  • @uzairzarry8691
    @uzairzarry8691 3 หลายเดือนก่อน

    Great explanation

  • @Remesayy
    @Remesayy 3 หลายเดือนก่อน

    Thanks for the video

  • @TechTalk870
    @TechTalk870 3 หลายเดือนก่อน

    I'm very interested if you could make an AI course 😊😇

  • @Un_revealing
    @Un_revealing 3 หลายเดือนก่อน

    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, 🙃🙃

  • @layfonkolar108
    @layfonkolar108 3 หลายเดือนก่อน

    Bro can you please use ui with a pop out color to see clearly

  • @robert-qn8hy
    @robert-qn8hy 3 หลายเดือนก่อน

    Bro can you please a make video on python daemon threads please...

  • @angelnoyola4830
    @angelnoyola4830 3 หลายเดือนก่อน

    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

    • @angelnoyola4830
      @angelnoyola4830 3 หลายเดือนก่อน

      Or do any of yall recommend a bootcamp? Please I would love to know

  • @СараЕркінбаева
    @СараЕркінбаева 3 หลายเดือนก่อน

    What laptop do you use for it?

  • @YoruAmeHD
    @YoruAmeHD 3 หลายเดือนก่อน

    i get error of no attribute 'Thread'(most likely due to a circular import) any help?

  • @benjmeistah
    @benjmeistah 27 วันที่ผ่านมา

    dud, ffs please carry my unborn children! Thank You so much :D

  • @akulalokesh6866
    @akulalokesh6866 3 หลายเดือนก่อน

    hii bro