AsyncSequence
public extension AsyncSequence
-
Convert an
AsyncSequenceto anObservable.Iteration runs in a detached task to prevent blocking the calling thread. Use
.observe(on:)to control event delivery (e.g.,MainScheduler.instancefor UI updates).Declaration
Swift
func asObservable(priority: TaskPriority? = nil) -> Observable<Element>Parameters
priorityPriority for the detached task
Return Value
An
Observableof the async sequence’s element type
View on GitHub