Module: LockManager
- Included in:
- FileConnector
- Defined in:
- lib/lock_manager.rb
Instance Method Summary collapse
Instance Method Details
#grab_ex_lock ⇒ Object
2 3 4 |
# File 'lib/lock_manager.rb', line 2 def grab_ex_lock @file.flock(File::LOCK_EX) end |
#grab_sh_lock ⇒ Object
6 7 8 |
# File 'lib/lock_manager.rb', line 6 def grab_sh_lock @file.flock(File::LOCK_SH) end |
#release_lock ⇒ Object
10 11 12 |
# File 'lib/lock_manager.rb', line 10 def release_lock @file.flock(File::LOCK_UN) end |