# SharedPublisher

## class SharedPublisher(publisher: Publisher)[source]

Bases: [`Publisher`](https://dev.nominal.io/instro/ref/library/instro.lib.publishers.publisher.Publisher.md#instro.lib.publishers.publisher.Publisher "instro.lib.publishers.publisher.Publisher")

A publisher that can be shared between multiple instruments.

Initialize a shared publisher, assuming exclusive ownership of the publisher provided.

Methods

| [`clone`](https://dev.nominal.io/instro/ref/library/instro.lib.publishers.publisher.SharedPublisher.md#instro.lib.publishers.publisher.SharedPublisher.clone "instro.lib.publishers.publisher.SharedPublisher.clone") | Clone the shared publisher for use with another instrument. |
| --- | --- |
| [`close`](https://dev.nominal.io/instro/ref/library/instro.lib.publishers.publisher.SharedPublisher.md#instro.lib.publishers.publisher.SharedPublisher.close "instro.lib.publishers.publisher.SharedPublisher.close") | Close this instance and possibly release the underlying publisher. |
| [`publish`](https://dev.nominal.io/instro/ref/library/instro.lib.publishers.publisher.SharedPublisher.md#instro.lib.publishers.publisher.SharedPublisher.publish "instro.lib.publishers.publisher.SharedPublisher.publish") | Publish data to the underlying publisher being shared. |

### clone() → SharedPublisher[source]

Clone the shared publisher for use with another instrument.

### publish( data: Measurement | Command, **kwargs, ) → None[source]

Publish data to the underlying publisher being shared.

### close() → None[source]

Close this instance and possibly release the underlying publisher.
