Multithreading & Async in iOS | A Basic Introduction
HTML-код
- Опубликовано: 24 окт 2020
- Learn how to use dispatch queues to perform tasks on a background queue in iOS with Swift.
🔗Code:
github.com/Sam-Meech-Ward/iOS...
🔗Entire iOS Playlist
• iOS with UIKit
🔗Moar Links
My Website: www.sammeechward.com
Instagram: / meech_ward
Github: github.com/orgs/Sam-Meech-Ward
Ray Wenderlich Grand Central Dispatch Tutorial for Swift 4: www.raywenderlich.com/5370-gr...
Intro to networking in iOS: • Networking in iOS with... Развлечения
Dude I was lost in the sauce with dispatch queue and that was a super legit explanation thank you
Понятное объяснение. Спасибо!
Thank you for your detailed and clear explanation, it was very helpful and understandable.
You are welcome 🤗
Hello Sam, great video! I understand more on DispatchQueue now thanks! I do have a question for you about this subject. I was wondering if I may ask you for some help please? thanks again for making this video and hope to hear from you soon
What is the difference between sync vs async?
One is synchronous and the other is asynchronous 🤣
print("a")
backgroundQueue.async {
print("b")
}
print("c")
The short answer is: the order that these will be printed out is a, c, b. If you change async to sync, the order will be a, b, c. Even though print("b") happens on a different queue, the main queue will still wait for it to complete if we use a sync block. sync is not usually desirable.
That's a weird place for a fireplace.