Contents

Publishers.Share

A publisher that shares the output of an upstream publisher with multiple subscribers.

Declaration

final class Share<Upstream> where Upstream : Publisher

Overview

This publisher type supports multiple subscribers, all of whom receive unchanged elements and completion states from the upstream publisher.

Be aware that Publishers.Share is a class rather than a structure like most other publishers. Use this type when you need a publisher instance that uses reference semantics.

Topics

Creating a share publisher

Declaring supporting types

Inspecting publisher properties

Comparing publishers

See Also

Working with multiple subscribers