Generic Instance Method


Ignores elements from the upstream publisher until it receives an element from a second publisher.


func drop<P>(untilOutputFrom publisher: P) -> Publishers.DropUntilOutput<Publishers.Concatenate<Prefix, Suffix>, P> where P : Publisher, Self.Failure == P.Failure



A publisher to monitor for its first emitted element.

Return Value

A publisher that drops elements from the upstream publisher until the other publisher produces a value.


This publisher requests a single value from the upstream publisher, and it ignores (drops) all elements from that publisher until the upstream publisher produces a value. After the other publisher produces an element, this publisher cancels its subscription to the other publisher, and allows events from the upstream publisher to pass through. After this publisher receives a subscription from the upstream publisher, it passes through backpressure requests from downstream to the upstream publisher. If the upstream publisher acts on those requests before the other publisher produces an item, this publisher drops the elements it receives from the upstream publisher.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software