diff options
author | Xavier Noria <fxn@hashref.com> | 2015-11-22 11:34:08 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2015-11-22 11:34:08 +0100 |
commit | 0b9812bddea50f974d51175ae81bfd6d8407f946 (patch) | |
tree | f37bb776c994e4674580097025a393a79218c2b9 /actionpack/test/abstract | |
parent | 4596c1a31902806a15c970a0e210942912b139b6 (diff) | |
download | rails-0b9812bddea50f974d51175ae81bfd6d8407f946.tar.gz rails-0b9812bddea50f974d51175ae81bfd6d8407f946.tar.bz2 rails-0b9812bddea50f974d51175ae81bfd6d8407f946.zip |
removes the mutex around `changed`
This method needs to ensure that if a change happens, it is going to be registered.
With this refactor suggested by @matthewd race conditions do not matter because if
no file is watched, nothing is done. And as long as some invocation sets the flag
to true, it will stay true.
The refactor leaves a race condition in which two simultaneous threads that watch
some of the files passed do the actual work in `any?`, whereas the mutex guaranteed
that was done at most once. But this is considered to be a better tradeoff.
Diffstat (limited to 'actionpack/test/abstract')
0 files changed, 0 insertions, 0 deletions