---
title: Publishers.Share
framework: combine
role: symbol
role_heading: Class
path: combine/publishers/share
---

# Publishers.Share

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

## Declaration

```swift
final class Share<Upstream> where Upstream : Publisher
```

## Overview

Overview This publisher type supports multiple subscribers, all of whom receive unchanged elements and completion states from the upstream publisher. tip: Publishers.Share is effectively a combination of the Publishers.Multicast and PassthroughSubject publishers, with an implicit autoconnect(). 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

- [init(upstream:)](combine/publishers/share/init(upstream:).md)

### Declaring supporting types

- [Publishers.Share.Output](combine/publishers/share/output.md)
- [Publishers.Share.Failure](combine/publishers/share/failure.md)

### Inspecting publisher properties

- [upstream](combine/publishers/share/upstream.md)

### Comparing publishers

- [==(_:_:)](combine/publishers/share/==(_:_:).md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [Publisher](combine/publisher.md)

## See Also

### Working with multiple subscribers

- [Publishers.Multicast](combine/publishers/multicast.md)
