= private = protected
lock()
Attempts to grab the lock and waits if it isn’t available.
# File lib/thread.rb, line 92 def lock while (Thread.critical = true; @locked) @waiting.push Thread.current Thread.stop end @locked = true Thread.critical = false self end