Method: Rex::ReadWriteLock#lock_write

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

#lock_writeObject

Acquire the exclusive write lock.



114
115
116
117
118
119
120
121
122
123
124
125
126
# File 'lib/rex/sync/read_write_lock.rb', line 114

def lock_write
  write_sync_mutex.lock

  begin
    @writer = true

    exclusive_mutex.lock

    @owner  = Thread.current
  ensure
    write_sync_mutex.unlock
  end
end