# File lib/climate_control/environment.rb, line 15 def synchronize if @owner == Thread.current return yield if block_given? end @semaphore.synchronize do begin @owner = Thread.current yield if block_given? ensure @owner = nil end end end