MakeThreadSafeKeyedCollectionChangeset
@frozen
public struct MakeThreadSafeKeyedCollectionChangeset<Upstream, T> : Publisher where Upstream : Publisher, T : RealmKeyedCollection, Upstream.Output == RealmMapChange<T>
A helper publisher created by calling .threadSafeReference()
on a
publisher which emits RealmMapChange
.
-
Specifies the scheduler on which to receive elements from the publisher.
This publisher converts each value emitted by the upstream publisher to a
ThreadSafeReference
, passes it to the target scheduler, and then converts back to the original type.Declaration
Swift
public func receive<S>(on scheduler: S) -> DeferredHandoverKeyedCollectionChangeset<Upstream, T, S> where S : Scheduler
Parameters
scheduler
The serial dispatch queue to receive values on.
Return Value
A publisher which delivers values to the given scheduler.