Method: Thread::Pool#shutdown_after

Defined in:
lib/thread/pool.rb

#shutdown_after(timeout) ⇒ Object

Shutdown the pool after a given amount of time.



308
309
310
311
312
313
314
315
316
# File 'lib/thread/pool.rb', line 308

def shutdown_after (timeout)
	Thread.new {
		sleep timeout

		shutdown
	}

	self
end