Method: WatchmonkeyCli::Application::Core#spawn_threads_and_run!

Defined in:
lib/watchmonkey_cli/application/core.rb

#spawn_threads_and_run!Object



178
179
180
181
182
183
184
185
186
187
188
189
190
191
# File 'lib/watchmonkey_cli/application/core.rb', line 178

def spawn_threads_and_run!
  if @opts[:threads] > 1
    debug "Spawning #{@opts[:threads]} consumer threads..."
    @opts[:threads].times do
      @threads << Thread.new do
        Thread.current.abort_on_exception = true
        _queueoff
      end
    end
  else
    debug "Running threadless..."
    _queueoff
  end
end