Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
class · Ruby 3.3
Monitor
< Object
14 instance methods
Use the Monitor class when you want to have a lock object for blocks with mutual exclusion.
Example
require 'monitor' lock = Monitor.new lock.synchronize do # exclusive access end