Method: Rex::ReadWriteLock#unlock_write

Defined in:
lib/rex/sync/read_write_lock.rb

#unlock_writeObject

Release the exclusive write lock.



131
132
133
134
135
136
137
138
139
140
141
142
# File 'lib/rex/sync/read_write_lock.rb', line 131

def unlock_write
  # If the caller is not the owner of the write lock, then someone is
  # doing something broken, let's let them know.
  if (Thread.current != @owner)
    raise RuntimeError, "Non-owner calling thread attempted to release write lock", caller
  end

  # Otherwise, release the exclusive write lock
  @writer = false

  exclusive_mutex.unlock
end