From the course: Learning Combine with Swift

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Manage threads with schedulers

Manage threads with schedulers - Swift Tutorial

From the course: Learning Combine with Swift

Start my 1-month free trial

Manage threads with schedulers

- Thread management is a vital aspect of being a mindful Swift developer and it combines and applied just as equally as another aspect of your Swift development. When using combine to update your application's UI elements, it is crucial that you optimize your streams to use the main thread but to also not degrade the user experience. In this video, we'll touch on how the framework leverages sequence protocol in various operators to effectively and efficiently manage your data streams. Before we dive into the weeds of threading, let's talk a bit of scheduler protocol. Central to thread management and combine is the scheduler protocol. A protocol that defines when and how to execute a closure, whether it is immediately or sometime in the future run. This protocol abstracts the complexities of thread management as a managed service, as either publisher upstream or subscription downstream level. Two of the most common…

Contents