Generic Instance Method

multicast(_:)

Applies a closure to create a subject that delivers elements to subscribers.

Declaration

func multicast<S>(_ createSubject: @escaping () -> S) -> Publishers.Multicast<AnyPublisher<Output, Failure>, S> where S : Subject, Self.Failure == S.Failure, Self.Output == S.Output

Parameters

createSubject

A closure to create a new Subject each time a subscriber attaches to the multicast publisher.