public Method

Sync_m.sync_lock(m = EX)

There's no documentation for this item.

Source Code

# File sync.rb, line 140
def sync_lock(m = EX)
  return unlock if m == UN

  until (Thread.critical = true; sync_try_lock_sub(m))
    if sync_sh_locker[Thread.current]
      sync_upgrade_waiting.push [Thread.current, sync_sh_locker[Thread.current]]
      sync_sh_locker.delete(Thread.current)
    else
      sync_waiting.push Thread.current
    end
    Thread.stop
  end
  Thread.critical = false
  self
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.