# File lib/thread.rb, line 199 def wait(mutex) begin mutex.exclusive_unlock do @waiters.push(Thread.current) Thread.stop end ensure mutex.lock end end