Class: Rubcask::Concurrency::FakeLock
- Inherits:
-
Object
- Object
- Rubcask::Concurrency::FakeLock
- Defined in:
- lib/rubcask/concurrency/fake_lock.rb
Overview
Fake of Concurrent::ReentrantReadWriteLock It does not do any synchronization
Instance Method Summary collapse
- #acquire_read_lock ⇒ Object
- #acquire_write_lock ⇒ Object
- #has_waiters? ⇒ Boolean
- #release_read_lock ⇒ Object
- #release_write_lock ⇒ Object
- #with_read_lock ⇒ Object
- #with_write_lock ⇒ Object
- #write_locked? ⇒ Boolean
Instance Method Details
#acquire_read_lock ⇒ Object
8 9 10 |
# File 'lib/rubcask/concurrency/fake_lock.rb', line 8 def acquire_read_lock true end |
#acquire_write_lock ⇒ Object
12 13 14 |
# File 'lib/rubcask/concurrency/fake_lock.rb', line 12 def acquire_write_lock true end |
#has_waiters? ⇒ Boolean
24 25 26 |
# File 'lib/rubcask/concurrency/fake_lock.rb', line 24 def has_waiters? false end |
#release_read_lock ⇒ Object
16 17 18 |
# File 'lib/rubcask/concurrency/fake_lock.rb', line 16 def release_read_lock false end |
#release_write_lock ⇒ Object
20 21 22 |
# File 'lib/rubcask/concurrency/fake_lock.rb', line 20 def release_write_lock false end |
#with_read_lock ⇒ Object
32 33 34 |
# File 'lib/rubcask/concurrency/fake_lock.rb', line 32 def with_read_lock yield end |
#with_write_lock ⇒ Object
28 29 30 |
# File 'lib/rubcask/concurrency/fake_lock.rb', line 28 def with_write_lock yield end |
#write_locked? ⇒ Boolean
36 37 38 |
# File 'lib/rubcask/concurrency/fake_lock.rb', line 36 def write_locked? false end |