waiting on file system event don't block process on linux now (guard can be stopped, spec run but don't pass)
This commit is contained in:
parent
2191bc1088
commit
8a63b94247
@ -45,13 +45,16 @@ module Guard
|
|||||||
|
|
||||||
def watch_change
|
def watch_change
|
||||||
while !@stop
|
while !@stop
|
||||||
inotify.process
|
if IO.select([notifier.to_io], [], [], latency)
|
||||||
unless files.empty?
|
notifier.process
|
||||||
files.map! { |file| file.gsub("#{Dir.pwd}/", '') }
|
|
||||||
callback.call(files)
|
unless files.empty?
|
||||||
files.clear
|
files.map! { |file| file.gsub("#{Dir.pwd}/", '') }
|
||||||
|
callback.call(files)
|
||||||
|
files.clear
|
||||||
|
end
|
||||||
|
sleep latency
|
||||||
end
|
end
|
||||||
sleep latency
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user