Canceling delayed work
You scheduled DispatchQueue.main.asyncAfter(deadline: .now() + 2) { showTooltip() }, and if the user leaves the screen within 2 seconds it has to be canceled. How would you do that with GCD?
Canceling delayed work
You scheduled DispatchQueue.main.asyncAfter(deadline: .now() + 2) { showTooltip() }, and if the user leaves the screen within 2 seconds it has to be canceled. How would you do that with GCD?
ConcurrencyShort answerBasics
Calling the API on every keystroke in a search field floods it with requests. Can you imp…
#dispatchworkitem #cancellation #debounce
ConcurrencyMultiple choiceExpert
In this Swift Concurrency code, which statement about what actually happens right after t…
#cancellation #task-sleep
iOS system designShort answerBasics
Design the search screen of a music app: autocomplete while typing, a results list, and r…
#cancellation #debounce
ConcurrencyShort answerBasics
You're building an image pipeline: download, resize, then save to the disk cache, and whe…
#cancellation