guard / listen

The Listen gem listens to file modifications and notifies you about the changes.
https://rubygems.org/gems/listen
MIT License
1.92k stars 246 forks source link

stop sharing mutable var among threads [fix #351] #352

Closed e2 closed 8 years ago

e2 commented 8 years ago

Since the local variable 'worker' was modified on each iteration, some threads "caught" the value in the wrong state.

Using an array with an enumerator guarantees each thread receives a block with a separate copy of the variable.

unjello commented 8 years ago

This change introduced a bug in darwin adapter _log_exception 'fsevent: running worker failed: %s: %s' has incorrect number of parameters.