Class: Concurrent::Actor::Context

Inherits:
AbstractContext show all
Defined in:
lib/concurrent/actor/context.rb

Overview

Basic Context of an Actor. It does not support supervision and pausing. It simply terminates on error.

  • linking

  • terminates on error

TODO describe behaviour TODO usage

Examples:

ping

class Ping < Context
  def on_message(message)
    message
  end
end

Ping.spawn(:ping1).ask(:m).value #=> :m

Direct Known Subclasses

Utils::AdHoc

Instance Attribute Summary

Attributes inherited from AbstractContext

#core

Instance Method Summary collapse

Methods inherited from AbstractContext

#ask, #dead_letter_routing, #default_reference_class, #envelope, #on_envelope, #on_event, #on_message, #pass, #tell

Methods included from InternalDelegations

#behaviour, #behaviour!, #children, #context, #dead_letter_routing, #log, #redirect, #terminate!

Methods included from PublicDelegations

#context_class, #executor, #name, #parent, #path, #reference

Methods included from TypeCheck

#Child!, #Child?, #Match!, #Match?, #Type!, #Type?

Instance Method Details

#behaviour_definitionObject



135
136
137
# File 'lib/concurrent/actor/context.rb', line 135

def behaviour_definition
  Behaviour.basic_behaviour_definition
end