Class: Object

### Home Classes Methods

### In Files

- lib/celluloid/rspec/actor_examples.rb

### Parent

BasicObject

### Methods

- ::new
- #ask_name_with_timeout
- #blocking_call
- #check_exclusive
- #check_not_exclusive
- #cleanup
- #current_thread_name
- #do_sleep
- #drink_coffee
- #eat_donuts
- #exclusive_log_task
- #exclusive_with_block_log_task
- #fire_after
- #fire_every
- #fired
- #fired?
- #greet_by_proxy
- #java_thread
- #lambaste_subordinate
- #log_task
- #name
- #nested_exclusive_example
- #recursion_test
- #recursion_thunk
- #send_signal
- #signal_myself
- #signaled?
- #sleeping?
- #subordinate_lambasted?
- #to_s
- #wait_for_signal
- #waiting?

### Included Modules

- Celluloid::BARE_OBJECT_WARNING_MESSAGE

### Class/Module Index

Quicksearch

- Celluloid
- Celluloid::AbortError
- Celluloid::AbstractProxy
- Celluloid::Actor
- Celluloid::Actor::Sleeper
- Celluloid::ActorProxy
- Celluloid::ActorSystem
- Celluloid::AsyncCall
- Celluloid::AsyncProxy
- Celluloid::BlockCall
- Celluloid::BlockProxy
- Celluloid::BlockResponse
- Celluloid::CPUCounter
- Celluloid::Call
- Celluloid::CallChain
- Celluloid::Cell
- Celluloid::Cell::ExitHandler
- Celluloid::CellProxy
- Celluloid::ClassMethods
- Celluloid::Condition
- Celluloid::Condition::Waiter
- Celluloid::ConditionError
- Celluloid::DeadTaskError
- Celluloid::ErrorResponse
- Celluloid::EventedMailbox
- Celluloid::ExitEvent
- Celluloid::FSM
- Celluloid::FSM::ClassMethods
- Celluloid::FSM::State
- Celluloid::FSM::UnattachedError
- Celluloid::FiberStackError
- Celluloid::Future
- Celluloid::Future::Result
- Celluloid::FutureProxy
- Celluloid::Handler
- Celluloid::Handlers
- Celluloid::Incident
- Celluloid::IncidentLogger
- Celluloid::IncidentLogger::Severity
- Celluloid::IncidentReporter
- Celluloid::IncidentReporter::Formatter
- Celluloid::InstanceMethods
- Celluloid::InternalPool
- Celluloid::LinkingRequest
- Celluloid::LinkingResponse
- Celluloid::Links
- Celluloid::LogEvent
- Celluloid::Logger
- Celluloid::Logger::WithBacktrace
- Celluloid::Mailbox
- Celluloid::MailboxDead
- Celluloid::MailboxShutdown
- Celluloid::Method
- Celluloid::NamingRequest
- Celluloid::NotTaskError
- Celluloid::Notifications
- Celluloid::Notifications::Fanout
- Celluloid::Notifications::Subscriber
- Celluloid::PoolManager
- Celluloid::Probe
- Celluloid::Properties
- Celluloid::Receiver
- Celluloid::Receivers
- Celluloid::Registry
- Celluloid::Response
- Celluloid::ResumableError
- Celluloid::RingBuffer
- Celluloid::SignalConditionRequest
- Celluloid::Signals
- Celluloid::StackDump
- Celluloid::StackDump::ActorState
- Celluloid::StackDump::CellState
- Celluloid::StackDump::DisplayBacktrace
- Celluloid::StackDump::TaskState
- Celluloid::StackDump::ThreadState
- Celluloid::SuccessResponse
- Celluloid::SupervisionGroup
- Celluloid::SupervisionGroup::Member
- Celluloid::Supervisor
- Celluloid::SyncCall
- Celluloid::SyncProxy
- Celluloid::SystemEvent
- Celluloid::Task
- Celluloid::Task::TerminatedError
- Celluloid::Task::TimeoutError
- Celluloid::TaskFiber
- Celluloid::TaskSet
- Celluloid::TaskThread
- Celluloid::TerminationRequest
- Celluloid::Thread
- Celluloid::ThreadHandle
- Celluloid::UUID
- org
- org::jruby
- org::jruby::ext
- org::jruby::ext::fiber
- org::jruby::ext::fiber::ThreadFiber
- Bar
- Baz
- Blocker
- ExampleActorClass
- ExampleCrash
- ExampleMailbox
- ExampleProxy
- ExampleTask
- Fiber
- Foo
- MockActor
- Object
- Thread

No matching classes.

# Object

### Public Class Methods

new() click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 159
    def initialize
      sleep 0.1
    end

### Public Instance Methods

ask_name_with_timeout(other, duration) click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 1024
    def ask_name_with_timeout(other, duration)
      timeout(duration) { other.name }
    end

blocking_call() click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 894
    def blocking_call
      @blocker.block
    end

check_exclusive() click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 676
    def check_exclusive
      exclusive { Celluloid.exclusive? }
    end

check_not_exclusive() click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 672
    def check_not_exclusive
      Celluloid.exclusive?
    end

cleanup() click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 185
    def cleanup
      sleep 0.1
    end

current_thread_name() click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 294
    def current_thread_name
      java_thread.get_name
    end

do_sleep(n) click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 789
    def do_sleep(n)
      @sleeping = true
      sleep n
      @sleeping = false
    end

drink_coffee() click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 728
    def drink_coffee
      @tasks << 'coffee'
    end

eat_donuts() click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 723
    def eat_donuts
      sleep Celluloid::TIMER_QUANTUM
      @tasks << 'donuts'
    end

exclusive_log_task(task) click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 666
    def exclusive_log_task(task)
      sleep Celluloid::TIMER_QUANTUM
      log_task(task)
    end

exclusive_with_block_log_task(task) click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 659
    def exclusive_with_block_log_task(task)
      exclusive do
        sleep Celluloid::TIMER_QUANTUM
        log_task(task)
      end
    end

fire_after(n) click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 797
    def fire_after(n)
      after(n) { @fired = true }
    end

fire_every(n) click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 801
    def fire_every(n)
      @fired = 0
      every(n) { @fired += 1 }
    end

fired() click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 807
    def fired; @fired end

fired?() click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 806
    def fired?; !!@fired end

greet_by_proxy(actor) click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 98
    def greet_by_proxy(actor)
      actor.greet
    end

java_thread() click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 298
    def java_thread
      Thread.current.to_java.getNativeThread
    end

lambaste_subordinate(actor, reason) click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 504
    def lambaste_subordinate(actor, reason)
      @subordinate_lambasted = true
    end

log_task(task) click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 655
    def log_task(task)
      @tasks << task
    end

name() click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 1019
    def name
      sleep 0.5
      :foo
    end

nested_exclusive_example() click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 680
    def nested_exclusive_example
      exclusive { exclusive { nil }; Celluloid.exclusive? }
    end

recursion_test(recurse_through = nil) click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 117
    def recursion_test(recurse_through = nil)
      if recurse_through
        recurse_through.recursion_thunk(Celluloid::Actor.current)
      else
        Celluloid.detect_recursion
      end
    end

recursion_thunk(other) click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 130
    def recursion_thunk(other)
      other.recursion_test
    end

send_signal(value) click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 607
    def send_signal(value)
      signal :ponycopter, value
    end

signal_myself(obj, &block) click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 750
    def signal_myself(obj, &block)
      current_actor.mailbox << obj
      receive(&block)
    end

signaled?() click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 612
    def signaled?; @signaled end

sleeping?() click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 795
    def sleeping?; @sleeping end

subordinate_lambasted?() click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 502
    def subordinate_lambasted?; @subordinate_lambasted; end

to_s() click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 102
    def to_s
      "a ponycopter!"
    end

wait_for_signal() click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 596
    def wait_for_signal
      raise "already signaled" if @signaled

      @waiting = true
      value = wait :ponycopter

      @waiting = false
      @signaled = true
      value
    end

waiting?() click to toggle source

    # File lib/celluloid/rspec/actor_examples.rb, line 611
    def waiting?; @waiting end

[Validate]

Generated with the Darkfish Rdoc Generator 2.