Method: Thread::Pool#shutdown
- Defined in:
- lib/thread/pool.rb
#shutdown ⇒ Object
Shut down the pool, it will block until all tasks have finished running.
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 |
# File 'lib/thread/pool.rb', line 264 def shutdown @mutex.synchronize { @shutdown = :nicely @cond.broadcast } join if @timeout @shutdown = :now wake_up_timeout @timeout.join end self end |