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 - Swift Tutorial
From the course: Learning Combine with Swift
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Manage threads with schedulers4m 24s
-
(Locked)
Work with custom publishers and subscribers4m 45s
-
(Locked)
Throttle publisher data with backpressure4m 53s
-
(Locked)
Abstract Combine implementations with type erasures2m 8s
-
(Locked)
Leverage the Combine advanced operators5m 5s
-
(Locked)
Challenge: Call an API using schedulers and backpressure39s
-
(Locked)
Solution: Call an API using schedulers and backpressure2m 44s
-
(Locked)
-