method
start_thread

v2_2_9 -
Show latest stable
-
0 notes -
Class: ThreadPool
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125
- 1_9_3_392
- 2_1_10 (0)
- 2_2_9 (0)
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
start_thread()
private
Hide source
# File lib/rake/thread_pool.rb, line 118 def start_thread # :nodoc: @threads_mon.synchronize do next unless @threads.count < @max_active_threads t = Thread.new do begin while safe_thread_count <= @max_active_threads break unless process_queue_item end ensure @threads_mon.synchronize do @threads.delete Thread.current stat :ended, :thread_count => @threads.count @join_cond.broadcast if @threads.empty? end end end @threads << t stat( :spawned, :new_thread => t.object_id, :thread_count => @threads.count) @total_threads_in_play = @threads.count if @threads.count > @total_threads_in_play end end