In Files

  • mutex_m.rb

Class/Module Index [+]




When ‘mutex_m’ is required, any object that extends or includes Mutex_m will be treated like a Mutex.

Start by requiring the standard library Mutex_m:

require "mutex_m.rb"

From here you can extend an object with Mutex instance methods:

obj =
obj.extend Mutex_m

Or mixin Mutex_m into your module to your class inherit Mutex instance methods.

class Foo
  include Mutex_m
  # ...
obj =
# this obj can be handled like Mutex

Public Instance Methods

mu_lock() click to toggle source

See Mutex#lock

               # File mutex_m.rb, line 87
def mu_lock
mu_locked?() click to toggle source

See Mutex#locked?

               # File mutex_m.rb, line 77
def mu_locked?
mu_synchronize(&block) click to toggle source

See Mutex#synchronize

               # File mutex_m.rb, line 72
def mu_synchronize(&block)
mu_try_lock() click to toggle source

See Mutex#try_lock

               # File mutex_m.rb, line 82
def mu_try_lock
mu_unlock() click to toggle source

See Mutex#unlock

               # File mutex_m.rb, line 92
def mu_unlock
sleep(timeout = nil) click to toggle source

See Mutex#sleep

               # File mutex_m.rb, line 97
def sleep(timeout = nil)

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit