Deciding what DispatchQueue to run a completion handler on
What’s the issue with calling UI-related completion handlers on background queues, and how can we ensure that all of our UI updates are performed on the main queue?
Articles, podcasts and news about Swift development, by John Sundell.
What’s the issue with calling UI-related completion handlers on background queues, and how can we ensure that all of our UI updates are performed on the main queue?
Brent Simmons returns to the show to discuss multi-threading and concurrency, and how to make good use of tools like Grand Central Dispatch. Also, building NetNewsWire in the open, the current state of SwiftUI, and the type of responsibilities that senior developers typically have.
In the second episode of Swift Clips, we’ll take a look at the DispatchQueue API, and how we can use it to write concurrent and asynchronous code in Swift.
Concurrent code can come in many different shapes and forms. Depending on what we’re trying to achieve, the abstraction that’ll prove to be the best fit might vary quite a lot from use case to use case. One such abstraction is Tasks, and this week, let’s take a look at some scenarios in which they can become really useful.
Grand Central Dispatch is one of the few different options available to us when it comes to asynchronous programming in Swift. Let’s take a look at how it works and how to use it.
A race condition is what happens when the expected completion order of a sequence of operations becomes unpredictable, causing our program logic to end up in an undefined state. This week, let's take a look at a common scenario that can cause race conditions, possible ways to avoid them - and how we can make our code more robust and predictable in the process.
Grand Central Dispatch is one of those fundamental technologies that most Swift developers have used countless times. This week, let’s go beyond async and take a look at some situations where GCD can be really useful, and how it can provide simpler (and more “Swifty”) options to many other Foundation APIs.