Class: Rubcask::Concurrency::FakeLock

Inherits:
Object
  • Object
show all
Defined in:
lib/rubcask/concurrency/fake_lock.rb

Overview

Fake of Concurrent::ReentrantReadWriteLock It does not do any synchronization

Instance Method Summary collapse

Instance Method Details

#acquire_read_lockObject



8
9
10
# File 'lib/rubcask/concurrency/fake_lock.rb', line 8

def acquire_read_lock
  true
end

#acquire_write_lockObject



12
13
14
# File 'lib/rubcask/concurrency/fake_lock.rb', line 12

def acquire_write_lock
  true
end

#has_waiters?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/rubcask/concurrency/fake_lock.rb', line 24

def has_waiters?
  false
end

#release_read_lockObject



16
17
18
# File 'lib/rubcask/concurrency/fake_lock.rb', line 16

def release_read_lock
  false
end

#release_write_lockObject



20
21
22
# File 'lib/rubcask/concurrency/fake_lock.rb', line 20

def release_write_lock
  false
end

#with_read_lockObject



32
33
34
# File 'lib/rubcask/concurrency/fake_lock.rb', line 32

def with_read_lock
  yield
end

#with_write_lockObject



28
29
30
# File 'lib/rubcask/concurrency/fake_lock.rb', line 28

def with_write_lock
  yield
end

#write_locked?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/rubcask/concurrency/fake_lock.rb', line 36

def write_locked?
  false
end