Class: Farce::Strict::Publisher
- Inherits:
-
Abstract::Publisher
- Object
- Abstract::Publisher
- Farce::Strict::Publisher
- Includes:
- Farce::Shareable::Unfreezable
- Defined in:
- lib/farce/strict/publisher.rb
Overview
Strict variant of Publisher.
Instance Method Summary collapse
-
#initialize(*subscribers) ⇒ Publisher
constructor
A new instance of Publisher.
-
#publish(message = nil) ⇒ self
(also: #send, #<<, #broadcast)
Publishes the given payload to all current subscribers.
Methods included from Farce::Shareable
Constructor Details
Instance Method Details
#publish(message = nil) ⇒ self Also known as: send, <<, broadcast
Publishes the given payload to all current subscribers.
Full bounded queues drop new messages. Failed publishing attempts to closed or frozen receivers cancel their subscriptions.
20 21 22 23 |
# File 'lib/farce/strict/publisher.rb', line 20 def publish( = nil) return super if Ractor.shareable?() raise Ractor::IsolationError, "value must be Ractor-shareable" end |