Library / Concurrency / Communication / Subscription
CLASS
Subscription
A scope-bound handle to a MessageBroker subscription.
Fields 1
MUTABLE REFERENCE Channel[T] channelRef
Constructors 1
INIT(MUTABLE REFERENCE Channel[T] channel)
Methods 2
MODIFY METHOD receive() RETURNS | Tmodifies
Blocking receive of the next published value. Pipe-XOR: SUCCESS yields the value; FAILURE once the channel is closed and drained.
MODIFY METHOD tryReceive() RETURNS | Tmodifies
Non-blocking receive. Pipe-XOR: SUCCESS if a value is buffered;
FAILURE immediately otherwise. A WHILE sub->tryReceive() DO { … }
loop drains whatever is currently buffered and exits.