lib/griffin/thread_pool.rb in griffin-0.1.3 vs lib/griffin/thread_pool.rb in griffin-0.1.4
- old
+ new
@@ -43,10 +43,13 @@
end
def shutdown
@shutdown = true
@pool_size.times { @tasks.push(nil) }
- sleep 1 until @workers.empty?
+ until @workers.empty?
+ Griffin.logger.debug("#{@pool_size - @spawned} worker thread(s) shutdowned, waiting #{@spawned}")
+ sleep 1
+ end
end
private
def spawn_thread