Type:
Module

mutex_m.rb

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 = Object.new
obj.extend Mutex_m

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

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

sleep(timeout = nil) Instance Public methods See

2015-04-20 09:22:29
mu_try_lock

mu_try_lock() Instance Public methods See

2015-04-20 09:14:01
mu_lock

mu_lock() Instance Public methods See

2015-04-20 09:00:32
mu_locked?

mu_locked?() Instance Public methods See

2015-04-20 09:03:26
mu_synchronize

mu_synchronize(&block) Instance Public methods See

2015-04-20 09:08:54
mu_unlock

mu_unlock() Instance Public methods See

2015-04-20 09:15:59