# File lib/listen/adapters/darwin.rb, line 25 def start(blocking = true) @mutex.synchronize do return if @stop == false super end @worker_thread = Thread.new { @worker.run } # The FSEvent worker needs sometime to startup. Turnstiles can't # be used to wait for it as it runs in a loop. # TODO: Find a better way to block until the worker starts. sleep 0.1 @poll_thread = Thread.new { poll_changed_dirs } if @report_changes @worker_thread.join if blocking end