Class: Mongoo::FakeMutex

Inherits:
Object
  • Object
show all
Defined in:
lib/mongoo/async.rb

Instance Method Summary collapse

Constructor Details

#initializeFakeMutex

Returns a new instance of FakeMutex.


16
17
# File 'lib/mongoo/async.rb', line 16

def initialize
end

Instance Method Details

#lockObject


23
24
25
# File 'lib/mongoo/async.rb', line 23

def lock
  true
end

#locked?Boolean

Returns:

  • (Boolean)

27
28
29
# File 'lib/mongoo/async.rb', line 27

def locked?
  false
end

#sleep(timeout = nil) ⇒ Object


31
32
33
# File 'lib/mongoo/async.rb', line 31

def sleep(timeout=nil)
  true
end

#synchronizeObject


19
20
21
# File 'lib/mongoo/async.rb', line 19

def synchronize
  yield
end

#try_lockObject


35
36
37
# File 'lib/mongoo/async.rb', line 35

def try_lock
  true
end

#unlockObject


39
40
41
# File 'lib/mongoo/async.rb', line 39

def unlock
  true
end