Skip to content

Commit

Permalink
Bring back Spring::Watcher::Abstract#synchronize
Browse files Browse the repository at this point in the history
  • Loading branch information
byroot committed Nov 22, 2023
1 parent 8b285d5 commit c1facc5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Next Release

* Bring back `Spring::Watcher::Abstract#synchronize` method to fix compatibility with `spring-watcher-listen`.

## 4.1.2

* Drop dependency on `mutex_m`. Avoid issues with loading the wrong version before bundler kicks in.
Expand Down
5 changes: 5 additions & 0 deletions lib/spring/watcher/abstract.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ def initialize(root, latency)
@on_debug = nil
end

def synchronize(&block)
# Used by some gems.
@mutex.synchronize(&block)
end

def on_debug(&block)
@on_debug = block
end
Expand Down

0 comments on commit c1facc5

Please sign in to comment.