Method: Arrow::Session::Lock#read_lock
- Defined in:
- lib/arrow/session/lock.rb
#read_lock(blocking = true) ⇒ Object
Acquire a read (shared) lock. If blocking is false, will return false if the lock was not able to be acquired.
94 95 96 97 98 99 100 101 |
# File 'lib/arrow/session/lock.rb', line 94 def read_lock( blocking=true ) return true if self.read_locked? self.log.debug "Acquiring read lock" self.acquire_read_lock( blocking ) or return false @status |= READ self.log.debug "Got read lock" return true end |