Class: LightIO::Library::ThreadGroup
- Inherits:
-
Object
- Object
- LightIO::Library::ThreadGroup
- Includes:
- Base, Wrap::Wrapper
- Defined in:
- lib/lightio/library/thread.rb
Instance Method Summary collapse
Methods included from Wrap::Wrapper
Methods included from Base
Instance Method Details
#add(thread) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/lightio/library/thread.rb', line 10 def add(thread) if @obj.enclosed? raise ThreadError, "can't move from the enclosed thread group" elsif thread.is_a?(LightIO::Library::Thread) # let thread decide how to add to group thread.send(:add_to_group, self) else @obj.add(thread) end self end |
#list ⇒ Object
22 23 24 |
# File 'lib/lightio/library/thread.rb', line 22 def list @obj.list + threads end |