Method: Arrow::Session::Lock#write_lock

Defined in:
lib/arrow/session/lock.rb

#write_lock(blocking = true) ⇒ Object

Acquire a write (exclusive) lock. If blocking is false, will return false if the lock was not able to be acquired.



106
107
108
109
110
111
112
113
# File 'lib/arrow/session/lock.rb', line 106

def write_lock( blocking=true )
	return true if self.write_locked?
	self.log.debug "Acquiring write lock"
	self.acquire_write_lock( blocking ) or return false
	@status |= WRITE
	self.log.debug "Got write lock"
	return true
end