Search debounce
Calling the API on every keystroke in a search field floods it with requests. Can you implement a debounce with GCD yourself, so the call only fires when there's been no further input for 300ms after the last keystroke?
Search debounce
Calling the API on every keystroke in a search field floods it with requests. Can you implement a debounce with GCD yourself, so the call only fires when there's been no further input for 300ms after the last keystroke?
ConcurrencyShort answerAdvanced
You scheduled DispatchQueue.main.asyncAfter(deadline: .now() + 2) { showTooltip() }, and …
#debounce #dispatchworkitem #cancellation
iOS system designShort answerBasics
Design the search screen of a music app: autocomplete while typing, a results list, and r…
#debounce #cancellation #search
ConcurrencyShort answerBasics
In Swift Concurrency, when you create a Task { }, when and where does that code run?
#task #cancellation
ConcurrencyMultiple choiceExpert
In this Swift Concurrency code, which statement about what actually happens right after t…
#task #cancellation