Class: Dramatis::Runtime::ThreadPool::PoolThread
- Inherits:
-
Thread
- Object
- Thread
- Dramatis::Runtime::ThreadPool::PoolThread
- Defined in:
- lib/dramatis/runtime/thread_pool.rb,
lib/dramatis/runtime/thread_pool.rb
Overview
:nodoc: all
Instance Method Summary collapse
-
#initialize(pool) ⇒ PoolThread
constructor
A new instance of PoolThread.
- #join ⇒ Object
- #true_join ⇒ Object
Constructor Details
#initialize(pool) ⇒ PoolThread
Returns a new instance of PoolThread.
74 75 76 77 78 79 80 81 82 83 |
# File 'lib/dramatis/runtime/thread_pool.rb', line 74 def initialize pool @pool = pool @mutex = Mutex.new @wait = ConditionVariable.new @state = :running super() do self.abort_on_exception = true target end end |
Instance Method Details
#join ⇒ Object
87 88 89 90 91 92 93 94 |
# File 'lib/dramatis/runtime/thread_pool.rb', line 87 def join # I've thought about this. It would be cool to implement join. It's not # too hard to do it when threads aren't reused ... which is kinda dumb. # It's possible to do it when threads are reused, by coding an allocation # counter in the "thread" object (but not the native thread). It'd be # cool, but I don't need it, so, oh well. raise "not implemented" end |
#true_join ⇒ Object
85 |
# File 'lib/dramatis/runtime/thread_pool.rb', line 85 alias true_join join |