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

  Переглядів 17,654

Swiftful Thinking

Swiftful Thinking

3 роки тому

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...

КОМЕНТАРІ: 49
@MrMichaelcaesario
@MrMichaelcaesario 2 роки тому
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 2 роки тому
Thanks Mike! 😃
@mystride
@mystride 2 роки тому
Million% Agree! Between Nick, Paul and Ray Wenderlich you can master any iOS concept.
@douglasrutledge1325
@douglasrutledge1325 2 роки тому
@@mystride I'll third that!
@cyrilgarcia2485
@cyrilgarcia2485 4 місяці тому
This is the perfect tutorial. No bells and whistles, just straight to the subject! Thank you!!!
@paulraggett7837
@paulraggett7837 3 роки тому
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 роки тому
I don't think I'll every get tired! Thanks again for the support Paul.
@toastrecon
@toastrecon 2 роки тому
Awesome, Nick! Thank you.
@emrah309
@emrah309 Рік тому
Best SwiftUI course! hands down
@nevemra5
@nevemra5 11 місяців тому
perfect as always. thank you Nick!
@coffeeCatPeanutDust
@coffeeCatPeanutDust 2 роки тому
Thank you Nick! This was really easy to follow. Great job as always
@pitmanra
@pitmanra 7 місяців тому
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.
@collinsmuthomi3581
@collinsmuthomi3581 Рік тому
Man, you are a blessing. Keep up the good work. Thank you Nick
@navysen6570
@navysen6570 2 роки тому
Man !!!! Your explanation is incredible !
@sakshipatil9537
@sakshipatil9537 2 роки тому
Amazing explanation!! Thank you so much 🙏🏻
@kdtechniquesofficial6153
@kdtechniquesofficial6153 2 роки тому
Thanks for the video Nick...❤️
@AADITYAAA
@AADITYAAA 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!
@dispatchswift
@dispatchswift 2 роки тому
Great video. 👏
@douglasrutledge1325
@douglasrutledge1325 2 роки тому
very exciting, I enjoyed every minute. thanks
@vladimirmoor
@vladimirmoor 2 роки тому
Great video! As always - perfect explanation! Little addition: you can also check the thread if you just set a breakpoint.
@alexsal6069
@alexsal6069 11 місяців тому
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!.
@JesseBy
@JesseBy 2 роки тому
Great! Thanks man
@bonifacy9511
@bonifacy9511 Рік тому
Thank you!!!
@workaholic7970
@workaholic7970 2 роки тому
Thank you man
@ojukwuezechukwu9712
@ojukwuezechukwu9712 3 роки тому
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 роки тому
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 :)
@kellyxiao3060
@kellyxiao3060 Рік тому
amazing!!!!!
@mig12394
@mig12394 3 роки тому
thanks for this graphic explanation !
@SwiftfulThinking
@SwiftfulThinking 3 роки тому
Glad it was helpful!
@jinglongzhu7034
@jinglongzhu7034 2 роки тому
Thank you! this is really helpful for me!
@SwiftfulThinking
@SwiftfulThinking 2 роки тому
Thanks Zhu!
@selvarajant
@selvarajant Рік тому
well explained
@rogerdeutsch5883
@rogerdeutsch5883 5 місяців тому
This is a fantastic video. Very clear explanation of background threads with simple clear code. Subscribed because of this video. 👍🏽
@SwiftfulThinking
@SwiftfulThinking 5 місяців тому
Glad it was helpful!
@eliasayele1102
@eliasayele1102 Рік тому
Thanks
@douglasrutledge1325
@douglasrutledge1325 Рік тому
Ok I worked on timers and notifications yesterday, now I'm back to [maybe] understand Background Threads
@vamsi3877
@vamsi3877 3 роки тому
Learned alot Thanks :)
@SwiftfulThinking
@SwiftfulThinking 3 роки тому
You're welcome Vamsi :)
@wandahu8058
@wandahu8058 Рік тому
Good!
@BSharing09
@BSharing09 Рік тому
This video is excellent and so important for who want to became good developer
@magicinternetmoney8715
@magicinternetmoney8715 Рік тому
💯
@ZefsAl
@ZefsAl 2 роки тому
You are my jedi
@auronedgevicks7739
@auronedgevicks7739 Рік тому
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
@Nunny25
@Nunny25 3 роки тому
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 роки тому
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
@mystride
@mystride 2 роки тому
What % utilization on the main thread do you consider too high? Where do you get worried?
@saurabh9446
@saurabh9446 Рік тому
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?
@muhammadnasser2735
@muhammadnasser2735 2 роки тому
Can you cover Firebase PLS
@rimini1974
@rimini1974 Рік тому
how is possible to understand in Xcode with part of the code is loading a specific thread?
How to use weak self in Swift | Continued Learning #18
20:33
Swiftful Thinking
Переглядів 16 тис.
Threads and Grand Central Dispatch in Swift
22:14
Stewart Lynch
Переглядів 20 тис.
Сын Расстроился Из-за Новой Стрижки Папы 😂
00:21
Глеб Рандалайнен
Переглядів 4,1 млн
Working at IBM, not switching jobs, and much more | Rising Through The Ranks Pod E25
41:59
Rising Through The Ranks Podcast
Переглядів 145
How to Learn to Code FAST (Do This or Keep Struggling)
11:00
Andy Sterkowitz
Переглядів 679 тис.
Big Tech AI Is A Lie
16:56
Tina Huang
Переглядів 54 тис.
3 MISTAKES to avoid when using Async / Await in Swift 😌
4:41
Vincent Pradeilles
Переглядів 9 тис.
ASMR Programming - Spinning Cube - No Talking
20:45
Servet Gulnaroglu
Переглядів 3,5 млн