Like queue, but runs the actor locally, on whatever thread sends it messages.
Like queue, but runs the actor locally, on whatever thread sends it messages.
Like ref, but runs the actor locally, on whatever thread sends it messages.
Like ref, but runs the actor locally, on whatever thread sends it messages.
Returns a discrete Process stream that can be added to or
halted asynchronously by sending the returned Actor messages.
Returns a discrete Process stream that can be added to or
halted asynchronously by sending the returned Actor messages.
message.queue.enqueue(a) adds an element to the stream in FIFO order,
message.queue.close terminates the stream,
message.queue.cancel terminates the stream immediately, ignoring queued messages,
message.queue.fail(e) terminates the stream with the given error, and
message.queue.fail(e,true) terminates the stream with the given error, ignoring queued messages.
Note that the memory usage of the actor can grow unbounded if
enqueue messages are sent to the actor faster than
they are dequeued by whatever consumes the output Process.
Use the message.queue.size message to asynchronously check the
queue size and throttle whatever is feeding the actor messages.
Returns a continuous Process whose value can be set
asynchronously using the returned Actor.
Returns a continuous Process whose value can be set
asynchronously using the returned Actor.
message.ref.Set(a,cb) eventually sets the value of the stream,
message.ref.Fail(e) terminates the stream with the given error,
or closes stream when error is End,
message.ref.Get(cb) gets current value of ref via callback
if passed with true will get current value only
when supplied serial is different from current serial
process will self-terminate if:
- Fail(End) is received as normal termination
- Fail(err) is received as termination with err as failure
- Set fails as termination with that set failure
- Get callback fails as termination with that get failure
Convert an Actor[A] to a Sink[Task, A].
Convert an Actor[A] to a Sink[Task, A].
Return actor and signal that forms the topic.
Return actor and signal that forms the topic. Each subscriber is identified by SubscriberRef and have
its own Queue to keep messages that enqueue when the subscriber is processing the emitted
messages from publisher.
There may be one or more publishers to single topic.
Messages that are processed :
message.topic.Publish - publishes single message to topic
message.topic.Fail - fails the topic. If the End si passed as cause, this topic is finished.
message.topic.Subscribe - Subscribes single subscriber and starts collecting messages for it
message.topic.UnSubscribe - Un-subscribes subscriber
message.topic.Get - Registers callback or gets messages in subscribers queue
Signal is notified always when the count of subscribers changes, and is set with very first subscriber