Class: Object

Inherits:
BasicObject
Defined in:
lib/revent/synchronize.rb

Instance Method Summary collapse

Instance Method Details

#mutexObject



6
7
8
# File 'lib/revent/synchronize.rb', line 6

def mutex
  @mutex ||= Mutex.new
end

#synchronizeObject



2
3
4
# File 'lib/revent/synchronize.rb', line 2

def synchronize
  mutex.synchronize { yield self }
end