Module: Tribe

Defined in:
lib/tribe/safe_set.rb,
lib/tribe.rb,
lib/tribe/root.rb,
lib/tribe/actor.rb,
lib/tribe/event.rb,
lib/tribe/future.rb,
lib/tribe/actable.rb,
lib/tribe/mailbox.rb,
lib/tribe/version.rb,
lib/tribe/registry.rb,
lib/tribe/exceptions.rb,
lib/tribe/actor_state.rb,
lib/tribe/dedicated_actor.rb,
lib/tribe/benchmark/throughput.rb

Overview

Ruby's built in Set class may not be thread safe. This class wraps each method to make it so. More methods will be wrapped as needed.

Defined Under Namespace

Modules: Actable, Benchmark Classes: Actor, ActorChildDied, ActorNameError, ActorParentDied, ActorReservedCommand, ActorShutdownError, ActorState, DedicatedActor, Event, Future, FutureError, FutureNoResult, FutureTimeout, Mailbox, Registry, RegistryError, Root, SafeSet, TribeError

Constant Summary collapse

VERSION =
'0.6.5'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.lockObject (readonly)

Returns the value of attribute lock


24
25
26
# File 'lib/tribe.rb', line 24

def lock
  @lock
end

Class Method Details

.loggerObject


39
40
41
42
43
# File 'lib/tribe.rb', line 39

def self.logger
  @lock.synchronize do
    @logger
  end
end

.logger=(val) ⇒ Object


45
46
47
48
49
# File 'lib/tribe.rb', line 45

def self.logger=(val)
  @lock.synchronize do
    @logger = val
  end
end

.registryObject


27
28
29
30
31
# File 'lib/tribe.rb', line 27

def self.registry
  @lock.synchronize do
    @registry ||= Tribe::Registry.new
  end
end

.rootObject


33
34
35
36
37
# File 'lib/tribe.rb', line 33

def self.root
  @lock.synchronize do
    @root ||= Tribe::Root.new(:name => 'root', :permit_root => true)
  end
end