method
lock
v1_8_7_330 -
Show latest stable
- Class:
DEBUGGER__::Mutex
lock()public
No documentation available.
# File lib/debug.rb, line 33
def lock
return if Thread.critical
return if @locker == Thread.current
while (Thread.critical = true; @locked)
@waiting.push Thread.current
Thread.stop
end
@locked = true
@locker = Thread.current
Thread.critical = false
self
end