From 742b9fe3ffc945894fcf3ede1de992b6bef2d202 Mon Sep 17 00:00:00 2001 From: Thibaud Guillaume-Gentil Date: Tue, 30 Aug 2011 10:48:29 +0200 Subject: [PATCH] Add sleep to not eat 100% cpu :) --- lib/guard.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/guard.rb b/lib/guard.rb index dcfb1e4..717d4a2 100644 --- a/lib/guard.rb +++ b/lib/guard.rb @@ -50,6 +50,8 @@ module Guard files = @files.dup @files.clear run { run_on_change_for_all_guards(files) } + else + sleep 0.1 end end end