Multi-threading with background threads and queues in Xcode | Continued Learning #17

Поделиться
HTML-код
  • Опубликовано: 6 окт 2024
  • In this video we will learn how to properly use background threads, also known as background queues. By default, all of the code that we write in our apps is executed on the "main thread", however, if the main thread ever gets overwhelmed with tasks, it can slow down, freeze, or even crash our app. Luckily, Apple provides us with easy access to many other threads that we can use to offload some of the work!
    We will review how to add different threads, how to perform tasks on a background thread, and how to return back to the main thread afterward. As we get into the second half of this course, we will begin to use background threads more often as we begin to do data intensive tasks, such as downloading data from the internet.
    Next video: • How to use weak self i...
    Last video: • Core Data relationship...
    🤙 WELCOME BACK 🤙
    WEBSITE: www.swiftful-t...
    DISCORD: / discord
    GITHUB: github.com/Swi...
    SAY THANKS: www.buymeacoff...

Комментарии • 51

  • @MrMichaelcaesario
    @MrMichaelcaesario 3 года назад +23

    Man, I binge watching your videos! I think you are one of the best instructor next to Paul Hudson. Your teaching style is clear and very easy to grasp. Keep on going ✊🏼

    • @SwiftfulThinking
      @SwiftfulThinking  3 года назад +1

      Thanks Mike! 😃

    • @mystride
      @mystride 2 года назад +1

      Million% Agree! Between Nick, Paul and Ray Wenderlich you can master any iOS concept.

    • @dugrut1325
      @dugrut1325 2 года назад

      @@mystride I'll third that!

  • @camilol-shide3533
    @camilol-shide3533 3 месяца назад +3

    Hands down the best video I've been seen about this topics. Thanks !!

  • @paulraggett7837
    @paulraggett7837 3 года назад +8

    You are going to get sick of me telling you how well you are doing with this course. Once again thank you.

    • @SwiftfulThinking
      @SwiftfulThinking  3 года назад +2

      I don't think I'll every get tired! Thanks again for the support Paul.

  • @cyrilgarcia2485
    @cyrilgarcia2485 10 месяцев назад +1

    This is the perfect tutorial. No bells and whistles, just straight to the subject! Thank you!!!

  • @collinsmuthomi3581
    @collinsmuthomi3581 Год назад +3

    Man, you are a blessing. Keep up the good work. Thank you Nick

  • @emrah309
    @emrah309 2 года назад +3

    Best SwiftUI course! hands down

  • @ojukwuezechukwu9712
    @ojukwuezechukwu9712 3 года назад +7

    Nice video, are you a teacher?. I've not seen anyone explain as good as you do. By watching your videos I learnt swift and swiftUI from scratch.

    • @SwiftfulThinking
      @SwiftfulThinking  3 года назад +6

      Hi Ojukwu! Welcome to my channel & thanks for the comment! I am just a Swift developer who enjoys teaching others how to make apps. Learning to code can be hard, but it doesn't have to be. I'm trying to make it as easy as possible :)

  • @AADITYAAA
    @AADITYAAA 2 года назад +2

    i can't thank you enough for everything that you are doing for the community I swear to god when I finally start learning I will come back and start supporting you on kofi!

  • @coffeeCatPeanutDust
    @coffeeCatPeanutDust 3 года назад +4

    Thank you Nick! This was really easy to follow. Great job as always

  • @ZTagger97
    @ZTagger97 3 месяца назад

    short, very in formative. Thank you

  • @vladimirmoor
    @vladimirmoor 2 года назад +1

    Great video! As always - perfect explanation! Little addition: you can also check the thread if you just set a breakpoint.

  • @navysen6570
    @navysen6570 2 года назад +1

    Man !!!! Your explanation is incredible !

  • @alexsal6069
    @alexsal6069 Год назад

    Thank you so much for this awesome videos. I need to learn about threads and this video is just perfect for my current level. I'm looking forward for watching all of the series!.

  • @rogerdeutsch5883
    @rogerdeutsch5883 11 месяцев назад

    This is a fantastic video. Very clear explanation of background threads with simple clear code. Subscribed because of this video. 👍🏽

  • @BSharing09
    @BSharing09 2 года назад +1

    This video is excellent and so important for who want to became good developer

  • @dugrut1325
    @dugrut1325 2 года назад +1

    very exciting, I enjoyed every minute. thanks

  • @nevemra5
    @nevemra5 Год назад

    perfect as always. thank you Nick!

  • @dispatchswift
    @dispatchswift 2 года назад +2

    Great video. 👏

  • @auronedgevicks7739
    @auronedgevicks7739 2 года назад +2

    change 100 to 10000 and you'll see multiple treads running to load data. it's far more clear what is happening than the 100

  • @sakshipatil9537
    @sakshipatil9537 2 года назад +1

    Amazing explanation!! Thank you so much 🙏🏻

  • @pitmanra
    @pitmanra Год назад +1

    Just a note that might help someone else: if (like me) you click on the spray bottle and then you see No Debug Session, make sure you click on the Run button to start the simulator.

  • @dugrut1325
    @dugrut1325 2 года назад

    Ok I worked on timers and notifications yesterday, now I'm back to [maybe] understand Background Threads

  • @toastrecon
    @toastrecon 2 года назад

    Awesome, Nick! Thank you.

  • @mig12394
    @mig12394 3 года назад +1

    thanks for this graphic explanation !

  • @kavinda_dilshan_paramsoodi
    @kavinda_dilshan_paramsoodi 2 года назад

    Thanks for the video Nick...❤️

  • @Nunny25
    @Nunny25 3 года назад +2

    Thanks Nick, perfect explanation.
    Only one question, Thread.current shows for example thread number 8 and in CPU window it is running in Thread 11. Numbers are diffirent?

    • @SwiftfulThinking
      @SwiftfulThinking  3 года назад +2

      Hey Charlie, the thread that prints out should be the same as the CPU window. It's possible that it opened up more than 1 background thread so there was confusion, but if #8 is printing on the console, then #8 should be lighting up on the CPU window at the same time. When debugging, I would rely on what's being printed to the console because there's no room for human error haha

  • @vamsi3877
    @vamsi3877 3 года назад +1

    Learned alot Thanks :)

  • @muhammadnasser2735
    @muhammadnasser2735 2 года назад +2

    Can you cover Firebase PLS

  • @bonifacy9511
    @bonifacy9511 Год назад

    Thank you!!!

  • @workaholic7970
    @workaholic7970 2 года назад

    Thank you man

  • @jinglongzhu7034
    @jinglongzhu7034 2 года назад

    Thank you! this is really helpful for me!

  • @selvarajant
    @selvarajant 2 года назад

    well explained

  • @saurabh9446
    @saurabh9446 2 года назад +1

    I don't see spikes on my background threads at all. After printing current threads it shows downloading happened on thread 6 but I only see spikes on main thread. Can somebody help me understand this?

  • @kellyxiao3060
    @kellyxiao3060 2 года назад

    amazing!!!!!

  • @eliasayele1102
    @eliasayele1102 Год назад

    Thanks

  • @JesseBy
    @JesseBy 2 года назад

    Great! Thanks man

  • @mystride
    @mystride 2 года назад

    What % utilization on the main thread do you consider too high? Where do you get worried?

  • @wandahu8058
    @wandahu8058 Год назад

    Good!

  • @ZefsAl
    @ZefsAl 2 года назад

    You are my jedi

  • @rimini1974
    @rimini1974 Год назад

    how is possible to understand in Xcode with part of the code is loading a specific thread?

  • @magicinternetmoney8715
    @magicinternetmoney8715 2 года назад

    💯