End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class · Ruby 3.2
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