Join Jon Bott for an in-depth discussion in this video Threading in the model, part of RxSwift: Design Patterns for iOS Developers.
- [Instructor] One other thing I want to talk about…is threading within observables.…If you look at our code, we have these observables,…which wrapped the task up here at the top, on line seven.…In that task, we are dispatching to another queue.…If you're running network tasks, those might be dispatched…to another queue.…The important thing to note is that there are two different…destinations to worry about threading.…One is the code within your observable,…in this case this get info method,…and the other is within your subscribe block.…
In our presenter, we're subscribing within here.…We're saying observe on.…You can also see stuff that says subscribe on.…These type of schedulers determine…which type of thread things will run on.…In our case, we've made the decision…of how things are threaded deep down in those other layers.…This observe on block tells us what thread this code…within our subscribe block will trigger on.…
The syntax is confusing.…Subscribe on is not your subscribe block.…Subscribe on will be the code within your observable.…
- RxSwift syntax
- Creating simple observables
- Architecting the model layer
- Using Core Data
- Grouping tasks
- Changing UI
- Threading in the model and UI
Skill Level Intermediate
Learning Server-Side Swift Using IBM Kiturawith Mohammad Azam1h 51m Intermediate
Swift 4: Protocol-Oriented Programmingwith Károly Nyisztor1h 44m Intermediate
Swift: Writing Reusable Frameworkswith David Okun1h 49m Intermediate
1. The Basics
2. Model Layer
3. Presenter and View
Next steps1m 17s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.