public Method

Mutex.synchronize() { || ... }

Obtains a lock, runs the block, and releases the lock when the block completes. See the example under Mutex.

Source Code

# File thread.rb, line 127
def synchronize
  lock
  begin
    yield
  ensure
    unlock
  end
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.