Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (20 sloc) 0.282 kb
# Mutex
class Mutex
def synchronize
self.lock
begin
yield
ensure
self.unlock
end
end
end
# Thread
class Thread
MUTEX_FOR_THREAD_EXCLUSIVE = Mutex.new
def self.exclusive
MUTEX_FOR_THREAD_EXCLUSIVE.synchronize{
yield
}
end
end
Jump to Line
Something went wrong with that request. Please try again.