Class: Celluloid::Thread

Inherits:
Thread
  • Object
show all
Defined in:
lib/celluloid/thread.rb

Instance Attribute Summary collapse

Attributes inherited from Thread

#uuid_counter, #uuid_limit

Instance Method Summary collapse

Instance Attribute Details

#busyObject

Returns the value of attribute busy.



7
8
9
# File 'lib/celluloid/thread.rb', line 7

def busy
  @busy
end

Instance Method Details

#<<(proc) ⇒ Object



38
39
40
41
# File 'lib/celluloid/thread.rb', line 38

def <<(proc)
  self[:celluloid_queue] << proc
  self
end

#actorObject

Obtain the Celluloid::Actor object for this thread



19
20
21
# File 'lib/celluloid/thread.rb', line 19

def actor
  self[:celluloid_actor]
end

#call_chain_idObject

Obtain the call chain ID for this thread



34
35
36
# File 'lib/celluloid/thread.rb', line 34

def call_chain_id
  self[:celluloid_chain_id]
end

#celluloid?Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/celluloid/thread.rb', line 3

def celluloid?
  true
end

#mailboxObject

Obtain the Celluloid mailbox for this thread



29
30
31
# File 'lib/celluloid/thread.rb', line 29

def mailbox
  self[:celluloid_mailbox]
end

#roleObject

Obtain the role of this thread



10
11
12
# File 'lib/celluloid/thread.rb', line 10

def role
  self[:celluloid_role]
end

#role=(role) ⇒ Object



14
15
16
# File 'lib/celluloid/thread.rb', line 14

def role=(role)
  self[:celluloid_role] = role
end

#taskObject

Obtain the Celluloid task object for this thread



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

def task
  self[:celluloid_task]
end