Class: Actor::Substitutes::ThreadGroup
- Inherits:
-
Object
- Object
- Actor::Substitutes::ThreadGroup
- Defined in:
- lib/actor/substitutes/thread_group.rb
Instance Method Summary collapse
- #add(thread) ⇒ Object
- #enclose ⇒ Object
- #enclosed? ⇒ Boolean
-
#initialize ⇒ ThreadGroup
constructor
A new instance of ThreadGroup.
- #list ⇒ Object
Constructor Details
#initialize ⇒ ThreadGroup
Returns a new instance of ThreadGroup.
4 5 6 7 |
# File 'lib/actor/substitutes/thread_group.rb', line 4 def initialize @list = [] @enclosed = false end |
Instance Method Details
#add(thread) ⇒ Object
9 10 11 |
# File 'lib/actor/substitutes/thread_group.rb', line 9 def add thread @list << thread end |
#enclose ⇒ Object
17 18 19 |
# File 'lib/actor/substitutes/thread_group.rb', line 17 def enclose @enclosed = true end |
#enclosed? ⇒ Boolean
21 22 23 |
# File 'lib/actor/substitutes/thread_group.rb', line 21 def enclosed? @enclosed end |
#list ⇒ Object
13 14 15 |
# File 'lib/actor/substitutes/thread_group.rb', line 13 def list @list.dup end |