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

Methods inherited from Thread

mailbox, receive

Instance Attribute Details

#busyObject

Returns the value of attribute busy


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

def busy
  @busy
end

Instance Method Details

#<<(proc) ⇒ Object


40
41
42
43
# File 'lib/celluloid/thread.rb', line 40

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

#actorObject

Obtain the Celluloid::Actor object for this thread


21
22
23
# File 'lib/celluloid/thread.rb', line 21

def actor
  self[:celluloid_actor]
end

#call_chain_idObject

Obtain the call chain ID for this thread


36
37
38
# File 'lib/celluloid/thread.rb', line 36

def call_chain_id
  self[:celluloid_chain_id]
end

#celluloid?Boolean

Returns:

  • (Boolean)

5
6
7
# File 'lib/celluloid/thread.rb', line 5

def celluloid?
  true
end

#mailboxObject

Obtain the Celluloid mailbox for this thread


31
32
33
# File 'lib/celluloid/thread.rb', line 31

def mailbox
  self[:celluloid_mailbox]
end

#roleObject

Obtain the role of this thread


12
13
14
# File 'lib/celluloid/thread.rb', line 12

def role
  self[:celluloid_role]
end

#role=(role) ⇒ Object


16
17
18
# File 'lib/celluloid/thread.rb', line 16

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

#taskObject

Obtain the Celluloid task object for this thread


26
27
28
# File 'lib/celluloid/thread.rb', line 26

def task
  self[:celluloid_task]
end