Module: Concurrent::ErlangActor::EnvironmentConstants

Included in:
Concurrent::ErlangActor
Defined in:
lib/concurrent-ruby-edge/concurrent/edge/erlang_actor.rb

Overview

These constants are useful where the body of an actor is defined. For convenience they are provided in this module for including.

Examples:

include Concurrent::ErlangActor::EnvironmentConstants
actor = Concurrent::ErlangActor.spawn(:on_thread) do
  receive on(Numeric) { |v| v.succ },
          on(ANY) { terminate :bad_message },
          on(TIMEOUT) { terminate :no_message },
          timeout: 1
end

Defined Under Namespace

Classes: AbstractLogicOperationMatcher, And, Or

Constant Summary collapse

TIMEOUT =

Unique identifier of a timeout, singleton.

Token.new 'TIMEOUT'
ANY =

A singleton which matches anything using #=== method

Promises::Channel::ANY