C# Threads, Tasks, Multi-threading & UI Cross-threading

40
27



In order to understand more complicated code that includes threads, Tasks, awaits, async and more, we first need to understand the underlying system and concepts that power them all… Threads.

In this video we take a look at what a thread is, what it means, how to create one and many, what effects threads have on our code in terms of speed, structure and flow.

We then take a look at the thread pool, tasks and what happens when you try to edit UI components from a non-UI thread and how to fix that.

Support Me:

Nguồn:https://wijstaanvooronzegrondrechten.org/

40 COMMENTS

  1. My only complaint is after living in a cube farm for 20 odd years, I can't stand to listen to the click and clack of keyboards. It would be much better if you filtered or setup the mike in some way to lessen that.

  2. Great video again – wanted to go through this and your 2hr tasks video before going any further with ASP.NET core.

    As usual your style of doing things is simultaneously intimidating yet extremely inspiring to watch an insanely talented developer have such a comprehensive understanding of so many technologies.

    Each video goes by quite fast but manages to pack in a lot of info I wouldn't otherwise get from an alternative video. Watched one by TimCorey recently who I'm still a big fan of, but is almost too slow now that I'm used to your faster pace.

    Seeing you do a lot of this on the fly really does motivate me as a back of the mind type thing to get back to VS and get coding when in a bit of a lazy rut after work

    Thanks again.

  3. UI Cross-Threading is EXTREMELY important because the first thing you run into in the real world is trying to update a component in the main UI thread from a different thread and then you start googling when you start getting the crash messages and then find there are dozens of different ways developers handle this and your brains are all scrambled!

  4. This video should have a lot more likes… You obviously have deep understanding of the topics and you can explain it well enough, considering it is quite abstract topic. Good job, I am subscribing to your channel

  5. How to Read a fucking Text file with Multiple Threads reading different Text ? like all these Checkers out there please help if you know

  6. Oh my, this is a nice rabbit hole. Great vid. I just used this multi threading to calculate primes 2 to 100 million in 2 seconds.

  7. bro could you tell me the source of your information you are so awesome in teaching
    does i need to read books or what to be like you , you are my Idol

  8. AngelSix.NewVideoIsPublished+= (video) =>
    {
    AddTofavorite(video);
    video.AddLike();
    video.AddGoodComment("So good video. Thnx you!");
    };

  9. Thank you seems so small when YOU are doing so much more. I was wondering if could you possibly change your VS Color Theme to anything other than the Dark in your next video. Please? I think, and I hope many people would agree with me, that the other Themes enhance legibility more. I'm very grateful to you, Luke.

LEAVE A REPLY

Please enter your comment!
Please enter your name here