Flowdock
method

lock

Importance_0
v1_8_7_330 - Show latest stable - 0 notes - Class: DEBUGGER__::Mutex
lock() public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# 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
Register or log in to add new notes.