Concurrency
Serial queue self-sync
You run this GCD code inside viewDidLoad of a UIKit view controller (main thread). What happens?
DispatchQueue.main.sync {
print("inside")
}
print("after")Pick one
You run this GCD code inside viewDidLoad of a UIKit view controller (main thread). What happens?
DispatchQueue.main.sync {
print("inside")
}
print("after")Pick one
ConcurrencyMultiple choiceAdvanced
You run this GCD code on the main thread. What's the output? …
#deadlock #sync #main-queue
ConcurrencyMultiple choiceIntro
Which of the following statements about sync/async and serial/concurrent queues are…
#sync #serial
ConcurrencyShort answerAdvanced
QA reports that the app sometimes freezes completely with no crash log. If you suspect a…
#deadlock #sync
ConcurrencyMultiple choiceAdvanced
You call this function, which takes a GCD queue, from the main thread. About how many…
#sync #serial