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