ActionManager.rb-wakeup.patch

Krzysztof Pawlik, 05/23/2011 11:49 AM

Download (586 Bytes)

View differences:

src/mad/ruby/ActionManager.rb Mon May 23 13:46:59 2011 +0200
162 162
    end
163 163

  
164 164
    def start_listener
165
        Thread.new {
166
                while true
167
                        sleep 5 + rand(11)
168
                        @threads_cond.signal
169
                end
170
        }
171

  
165 172
        while true
166 173
            @threads_mutex.synchronize {
167 174
                while ((@concurrency - @num_running)==0) || empty_queue