C# multithreading 🧶

Sdílet
Vložit
  • čas přidán 2. 07. 2021
  • C# multithreading tutorial example explained
    #C# #multithreading #threads
    // thread = an execution path of a program
    // We can use multiple threads to perform,
    // different tasks of our program at the same time.
    // Current thread running is "main" thread
    // using System.Threading;
    music credits 🎼 :
    ===========================================================
    Up In My Jam (All Of A Sudden) by - Kubbi / kubbi
    Creative Commons - Attribution-ShareAlike 3.0 Unported- CC BY-SA 3.0
    Free Download / Stream: bit.ly/2JnDfCE
    Music promoted by Audio Library • Up In My Jam (All Of A...
    ===========================================================
  • Věda a technologie

Komentáře • 266

  • @BroCodez
    @BroCodez  Před 2 lety +80

    using System;
    using System.Threading;
    namespace MyFirstProgram
    {
    class Program
    {
    static void Main(string[] args)
    {
    // thread = an execution path of a program
    // We can use multiple threads to perform,
    // different tasks of our program at the same time.
    // Current thread running is "main" thread
    // using System.Threading;
    Thread mainThread = Thread.CurrentThread;
    mainThread.Name = "Main Thread";
    //Console.WriteLine(mainThread.Name);
    Thread thread1 = new Thread(() => CountDown("Timer #1"));
    Thread thread2 = new Thread(() => CountUp("Timer #2"));
    thread1.Start();
    thread2.Start();
    Console.WriteLine(mainThread.Name + " is complete!");
    Console.ReadKey();
    }
    public static void CountDown(String name)
    {
    for (int i = 10; i >= 0; i--)
    {
    Console.WriteLine("Timer #1 : " + i + " seconds");
    Thread.Sleep(1000);
    }
    Console.WriteLine("Timer #1 is complete!");
    }
    public static void CountUp(String name)
    {
    for (int i = 0; i

    • @agoogleuser3402
      @agoogleuser3402 Před 2 lety +1

      Why are you uploading videos like this? Why don't make it a full course.

    • @girlkun7518
      @girlkun7518 Před 2 lety

      Hi! Could you make a video about topic "How to handle 2 keys pressed simultaneously in java"? Please... I'm Vietnamese and I'm really looking forward to this

    • @dakar_84
      @dakar_84 Před 2 lety +1

      @@agoogleuser3402 already

    • @georgebogheanu2200
      @georgebogheanu2200 Před rokem

      Beat YT alg !

    • @Tecwithjawad_bahi
      @Tecwithjawad_bahi Před rokem

      Thank u❤

  • @nico_qwer1732
    @nico_qwer1732 Před rokem +38

    Wow. This is clear, short and so easy to understand. No obnoxious music, just plain code and explanations. Thank you!

  • @MadeoStudios
    @MadeoStudios Před 24 dny +3

    Welcome adventurer! Seems like you've had a long way to get here (if you didn't skip any tutorial). Relax and be happy, because you just learned how to program in C# from the best teacher ever.
    Seems like I have to go! I wish you luck on your next programming adventure.

  • @FollyH
    @FollyH Před 2 lety +57

    Thank you for explaining this in a simple way, it's not easy to find this kind of stuff nowadays!

  • @seekpodcast
    @seekpodcast Před rokem +6

    Thank you so much. I was trying to wrap my head around multithreading as used in Sebastian Lague’s procedurally generated terrain tutorial and this helped me a ton to understand what was going on.

  • @ricardomartins5851
    @ricardomartins5851 Před 2 lety +6

    first time I ran into your channel, you explainned in 6 min what my lecturer couldn't in 2 hours! you got a new subscriber, thank you

  • @sergioernestotostadosanche5700

    I only can say: WOW, YOU EXPLANATION SKILL IS SECRET LEVEL!!! Thank you for your knowledge sharing.

  • @Takayaki42
    @Takayaki42 Před 2 lety +5

    Hey Bro, keep up the good work. These 50 C# videos helped me a lot to get a grip on the language. Thank you so much!

  • @guillaume8437
    @guillaume8437 Před rokem +2

    Bro Code! So great this video. It goes straight to the point, in a very simple manner and explains clearly the difference between with and without multithreading. Thumbs up!

  • @dixta
    @dixta Před 2 lety +2

    Oh nice, 50 new videos! Thanks for all of the effort put into these videos

  • @devfaldu9216
    @devfaldu9216 Před 2 lety +6

    Bro you should really continue this channel. Your explanation is sooo good. C# videos of such quality are hard to find on youtube

  • @shwetachavan751
    @shwetachavan751 Před 2 měsíci

    Completed all 50 videos. Thank you so much for the course. Your explanation and examples was very easy to understand. Thank you for all the amazing videos.

  • @kanekiken6431
    @kanekiken6431 Před 2 lety +2

    Yo that's some slick explaining you did there ... thanks got the basic concept down thanks to you

  • @hirenjethva6122
    @hirenjethva6122 Před 6 měsíci

    So easily explained, before this I thought of multithreading some tough concept but now the way you explained I will remember lifetime.
    Thank you...

  • @pyaewaye2928
    @pyaewaye2928 Před 4 měsíci

    Your style of teaching is concise and clear. Wish you would also do more advanced c# topics and tutorials. I learned a lot from this. Thank you.

  • @AhmadEn-iu5ph
    @AhmadEn-iu5ph Před rokem +9

    Since I got to know this channel, it has become my favorite channel when looking for comprehensive but concise and easy to understand programming courses!
    Great channel. Great content. Great teaching style. Very concise and precise and straight to the point!
    Thanks a lot for helping people learn to program :)

    • @sohairu
      @sohairu Před 11 měsíci +2

      he also finished all the courses not like stopping after uploading a few videos like other youtuebers

  • @aba22125
    @aba22125 Před 2 lety +1

    OMG thank you, I've been trying to learn that async sh*t, but that wasn't what I was looking for. This was extremely, INSANELY, simple.

  • @IvanIvanov-ig1zx
    @IvanIvanov-ig1zx Před 6 měsíci

    Simple and clear lessons.
    Verry good!
    Thanks.

  • @grantwilliams9838
    @grantwilliams9838 Před 10 měsíci

    Just subscribed. Two really great vids on topics I've been literally scouring the net for weeks. Just a fluke I've come across Bro Code. Keep up the excellent work!

  • @syllight9053
    @syllight9053 Před 2 lety +6

    Bro Code, ma bro. You've been cranking videos! I'm very happy for you and the other people who're gonna learn from you. I hope you got 8 hours of sleep though...

  • @akshatjain7178
    @akshatjain7178 Před 2 lety +2

    my man just spammed the upload button dayummmm .. now i have videos to binge all night

  • @mamedaleskerov1507
    @mamedaleskerov1507 Před 2 lety +2

    Thank you for your nice and clear explanation!!!

  • @kristijanlazarev
    @kristijanlazarev Před 2 měsíci

    Just finished each one of his courses, so amazing!

  • @jjherrera2b
    @jjherrera2b Před 5 měsíci

    Great, very helpful, thanks for sharing...

  • @mccordinator
    @mccordinator Před měsícem

    Thanks for this concise run through! :)

  • @linhquach8662
    @linhquach8662 Před rokem

    Great video, thank you for explaining this in a simple way. Keep it on!

  • @jiriklokocka7371
    @jiriklokocka7371 Před 2 měsíci

    Briliant tutorial, thank you!

  • @jkking3213
    @jkking3213 Před 2 lety +1

    I am glad to see you again!
    yo you uploaded a lot of videos!

  • @karlallanicsky
    @karlallanicsky Před rokem +1

    Thank you for this Bro! You are very clear and direct to the point, which makes the topics easy to understand

  • @Ragundah
    @Ragundah Před 2 lety

    Liked, Subscribed, and Commented. You've earned it. You're great.

  • @sinvalfelisberto
    @sinvalfelisberto Před rokem

    Thanks for sharing! Greetings from Brazil!

  • @dineshezeikel2578
    @dineshezeikel2578 Před 10 dny

    Nice explanation

  • @moisesreiter
    @moisesreiter Před 2 lety +1

    Amo tus videos Bro!!! Espero puedas subir mas!!! Un abrazo desde Perú

  • @Forshen
    @Forshen Před 10 měsíci

    Clear, simple, to the point. thanks!

  • @yasinmagan7116
    @yasinmagan7116 Před rokem

    Great explanation in a nutshell 👏👏

  • @timmyla90
    @timmyla90 Před rokem

    Thank you so much for explaining it so simple and easy to understand!

  • @mythos03
    @mythos03 Před rokem

    fantastic video series, thank you so much for your work!!!

  • @user-gk9fn8pu1f
    @user-gk9fn8pu1f Před 6 měsíci

    Thank you so much, your tutorial help me to learn a lot of new things!

  • @GiveUpOrGetUp
    @GiveUpOrGetUp Před rokem

    Thank you for explaining it very well. Was pulling hair all day to get a grasp about this topic.

  • @manyfailsonewin4352
    @manyfailsonewin4352 Před rokem

    really appreciating this channel. keep it nice and simple for us my bro.

  • @Anuli-Edom
    @Anuli-Edom Před měsícem

    Awesome work here.

  • @pastub
    @pastub Před 2 lety

    Very nice! I 'm checking all other material in this channel. Thanks!

  • @TheScorpionAly
    @TheScorpionAly Před 2 lety

    Awesome tutorial for beginners!

  • @CarlosGomez-kb24
    @CarlosGomez-kb24 Před 8 měsíci

    Thank you for the easy and quick lesson! :D

  • @Stellanovum
    @Stellanovum Před rokem

    Thanks for the tutorial! It was nice and easy to understand!

  • @davidcordero396
    @davidcordero396 Před 8 měsíci

    Clear and simple. Thanks alot!

  • @steirerdis
    @steirerdis Před rokem

    Thank you! This short clip helped alot!

  • @dimitriskaitatzis9770

    Thank you very much. You helped me a lot with my project. I was needing a timer, running on the "background" and your tutorial helped me a lot! :)

    • @TheDigitalZero
      @TheDigitalZero Před 7 měsíci

      I know it's been 6 months, but in case you haven't discovered it yet, you can use the DateTime type to compare a stored time value with the current time.

  • @ghaxxx8883
    @ghaxxx8883 Před 8 měsíci

    You helped me a lot.. the best tutorial out there.. thanksss

  • @tech-zenth
    @tech-zenth Před 7 měsíci

    Nice example

  • @megahombre24
    @megahombre24 Před 2 lety +2

    This was perfect, thanks a lot!!!

  • @ametist007
    @ametist007 Před 2 měsíci

    Your videos are great! Many others could not help me, and despite the foreign language, I understood you perfectly

  • @alexander5052
    @alexander5052 Před rokem

    Great explanation! Thank you!!!

  • @khizerhussain7613
    @khizerhussain7613 Před rokem

    Amazing tutorial

  • @minkworks6143
    @minkworks6143 Před 2 lety

    Great video. Thanks for posting.

  • @imperadordogado6189
    @imperadordogado6189 Před rokem

    Simple and clear. Ty bro!

  • @zypeth4634
    @zypeth4634 Před rokem

    Thank you for this video, I am commenting to boost the algorithm and help your channel cuz im so cool like that fr fr. But thanks :D

  • @_gabrielzin_6862
    @_gabrielzin_6862 Před 2 lety

    you're amazing bro, nice video!

  • @yipyiphooray339
    @yipyiphooray339 Před 2 lety +9

    U ARE SO UNDERRATED FFS

  • @patrickmachado7525
    @patrickmachado7525 Před rokem

    Awesome! Saved me hours of study!

  • @anurag_droidev
    @anurag_droidev Před 2 lety +1

    Thanks for all these videos they ar so helpful

  • @abdullah.nayem.enosisbd

    Excellent! Thanks a lot.

  • @gulbaharnecefzade367
    @gulbaharnecefzade367 Před 9 měsíci

    Awesome🤩👍

  • @stefanstrauberg6645
    @stefanstrauberg6645 Před 11 měsíci

    Easy, fast and importantly clear 👍😎

  • @surajwagh3654
    @surajwagh3654 Před rokem

    Superb

  • @sahinyusifli9756
    @sahinyusifli9756 Před rokem

    Thank you, it was so helpful!!

  • @jeffchungwailoong
    @jeffchungwailoong Před 2 lety

    nice explanation...

  • @kamalpoladov5531
    @kamalpoladov5531 Před rokem

    You are amazing. I really like your videos 👍🏻

  • @jorgesan7080
    @jorgesan7080 Před rokem

    Good video, quick and easy ! Thanks Bro !

  • @monkeibusiness
    @monkeibusiness Před 2 lety +12

    jesus christ my abo box, good stuff.

  • @Wesley-sz8nt
    @Wesley-sz8nt Před rokem

    Great video. Very useful.

  • @OnderCoskun-il8wj
    @OnderCoskun-il8wj Před rokem

    it was good task. Congrulations Bro!

  • @linzer-mm1fj
    @linzer-mm1fj Před rokem

    good explanation bro

  • @MahmoudSaadawy
    @MahmoudSaadawy Před rokem

    Amazing! Please upload more C# Tutorials about real projects.

  • @freddyboyys
    @freddyboyys Před 8 měsíci

    superb

  • @chriss1402
    @chriss1402 Před 17 dny

    well explained. Thanks.

  • @ElaKro
    @ElaKro Před rokem

    great clear video thank

  • @user-uk1op9nn8l
    @user-uk1op9nn8l Před 2 měsíci

    Well explained

  • @nikoloztskhvedadze4167

    Good one

  • @syllight9053
    @syllight9053 Před 2 lety

    If you ever feel lonely, remember we're your here for you, bro!

  • @josuecastro2244
    @josuecastro2244 Před 9 měsíci

    Thanks dude, great video

  • @nikoing
    @nikoing Před rokem

    Short but crucial... A nice video

  • @antischoker
    @antischoker Před 2 lety

    Nice Explanation. Thanks Bro :)

  • @jimzoo5254
    @jimzoo5254 Před 8 měsíci

    nice vedio.

  • @lezahmc75
    @lezahmc75 Před měsícem

    Oh thank you!! ❤❤❤

  • @flash11gog14
    @flash11gog14 Před 10 měsíci

    great explanation bro!

  • @natnaeltedros552
    @natnaeltedros552 Před 2 lety

    Great job

  • @reshma4524
    @reshma4524 Před 2 lety

    Thank you so much bro!

  • @Golden_games
    @Golden_games Před rokem

    Thanks for this 👍

  • @berkekaancetinkaya8721

    Extremely useful!

  • @Vijaykumar-yz5mt
    @Vijaykumar-yz5mt Před rokem

    very nice and simple way to make me clear : thanks Bro

  • @ciclismo1450
    @ciclismo1450 Před 2 lety

    Thank u my dood, very helpful video

  • @linus3k
    @linus3k Před 10 měsíci

    To the point. Easy, peasy.

  • @29partush
    @29partush Před rokem

    great video

  • @OtakuChamber
    @OtakuChamber Před 2 lety

    thanks, this is very easy to understand

  • @pawloaspaja289
    @pawloaspaja289 Před 2 lety

    Thank you bro! At 5:00 it was what I was loking about. Thanks

  • @hmto919
    @hmto919 Před rokem

    you got a new subscriber.. thanks

  • @somedudes6455
    @somedudes6455 Před rokem

    Thank you!

  • @shavitl.306
    @shavitl.306 Před 2 lety

    Great video!

  • @nhuyphung727
    @nhuyphung727 Před 2 lety

    Thank you so much !