MakeThreadSafeCollectionChangeset

public struct MakeThreadSafeCollectionChangeset<Upstream, T> : Publisher where Upstream : Publisher, T : RealmCollection, Upstream.Output == RealmCollectionChange<T>

A helper publisher created by calling .threadSafeReference() on a publisher which emits RealmCollectionChange.

  • 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) -> DeferredHandoverCollectionChangeset<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.