Class: Concurrent::Actor::Utils::AdHoc

Inherits:
Context show all
Includes:
AsAdHoc
Defined in:
lib/concurrent/actor/utils/ad_hoc.rb

Overview

Allows quick creation of actors with behaviour defined by blocks.

Examples:

ping

AdHoc.spawn :forward, an_actor do |where|
  # this block has to return proc defining #on_message behaviour
  -> message { where.tell message  }
end

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Instance Attribute Details

- (undocumented) core (readonly) Originally defined in class AbstractContext

Instance Method Details

- (undocumented) initialize(*args, &initializer) Originally defined in module AsAdHoc

- (undocumented) on_message(message) Originally defined in module AsAdHoc