A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://ruby-concurrency.github.io/concurrent-ruby/master/Concurrent/Actor/Behaviour.html below:

Module: Concurrent::Actor::Behaviour — Concurrent Ruby

Module: Concurrent::Actor::Behaviour
Defined in:
lib/concurrent-ruby-edge/concurrent/actor/behaviour.rb,
lib/concurrent-ruby-edge/concurrent/actor/behaviour/awaits.rb,
lib/concurrent-ruby-edge/concurrent/actor/behaviour/buffer.rb,
lib/concurrent-ruby-edge/concurrent/actor/behaviour/linking.rb,
lib/concurrent-ruby-edge/concurrent/actor/behaviour/pausing.rb,
lib/concurrent-ruby-edge/concurrent/actor/behaviour/abstract.rb,
lib/concurrent-ruby-edge/concurrent/actor/behaviour/supervising.rb,
lib/concurrent-ruby-edge/concurrent/actor/behaviour/termination.rb,
lib/concurrent-ruby-edge/concurrent/actor/behaviour/sets_results.rb,
lib/concurrent-ruby-edge/concurrent/actor/behaviour/removes_child.rb,
lib/concurrent-ruby-edge/concurrent/actor/behaviour/executes_context.rb,
lib/concurrent-ruby-edge/concurrent/actor/behaviour/errors_on_unknown_message.rb
Overview

Actors have modular architecture, which is achieved by combining a light core with chain of behaviours. Each message or internal event propagates through the chain allowing the behaviours react based on their responsibility.

If needed new behaviours can be added, or old one removed to get required behaviour.

Defined Under Namespace

Classes: Abstract, Awaits, Buffer, ErrorsOnUnknownMessage, ExecutesContext, Linking, Pausing, RemovesChild, SetResults, Supervising, Termination

Constant Summary collapse
MESSAGE_PROCESSED =
::Object.new
Class Method Summary collapse Class Method Details .base(on_error) ⇒ undocumented
105
106
107
108
109
110
# File 'lib/concurrent-ruby-edge/concurrent/actor/behaviour.rb', line 105

def self.base(on_error)
  [[SetResults, on_error],
      RemovesChild,
   Termination]
end
.basic_behaviour_definition ⇒ undocumented
77
78
79
80
81
# File 'lib/concurrent-ruby-edge/concurrent/actor/behaviour.rb', line 77

def self.basic_behaviour_definition
  [*base(:terminate!),
   *linking,
   *user_messages]
end
.linking ⇒ undocumented
113
114
115
# File 'lib/concurrent-ruby-edge/concurrent/actor/behaviour.rb', line 113

def self.linking
  [Linking]
end
.restarting_behaviour_definition(handle = :reset!, strategy = :one_for_one) ⇒ undocumented

Array of behaviours and their construction parameters.

[[Behaviour::SetResults, :pause!],
 [Behaviour::RemovesChild],
 [Behaviour::Termination],
 [Behaviour::Linking],
 [Behaviour::Pausing],
 [Behaviour::Supervising, :reset!, :one_for_one],
 [Behaviour::Awaits],
 [Behaviour::ExecutesContext],
 [Behaviour::ErrorsOnUnknownMessage]]
96
97
98
99
100
101
102
# File 'lib/concurrent-ruby-edge/concurrent/actor/behaviour.rb', line 96

def self.restarting_behaviour_definition(handle = :reset!, strategy = :one_for_one)
  [*base(:pause!),
   *linking,
   *supervised,
   *supervising(handle, strategy),
   *user_messages]
end
.supervised ⇒ undocumented
118
119
120
# File 'lib/concurrent-ruby-edge/concurrent/actor/behaviour.rb', line 118

def self.supervised
  [Pausing]
end
.supervising(handle = :reset!, strategy = :one_for_one) ⇒ undocumented
123
124
125
# File 'lib/concurrent-ruby-edge/concurrent/actor/behaviour.rb', line 123

def self.supervising(handle = :reset!, strategy = :one_for_one)
  [[Behaviour::Supervising, handle, strategy]]
end
.user_messages ⇒ undocumented

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4