Module: RubyGaurden::ThreadSafety
Instance Method Summary collapse
Instance Method Details
#execute ⇒ Object
63 64 65 |
# File 'lib/ruby_gaurden/thread_safety.rb', line 63 def execute(...) synchronize { super } end |
#maximum_execution_time ⇒ Object
59 60 61 |
# File 'lib/ruby_gaurden/thread_safety.rb', line 59 def maximum_execution_time synchronize { super } end |
#monitor ⇒ Object
71 72 73 |
# File 'lib/ruby_gaurden/thread_safety.rb', line 71 def monitor @monitor ||= Monitor.new end |
#synchronize ⇒ Object
67 68 69 |
# File 'lib/ruby_gaurden/thread_safety.rb', line 67 def synchronize(&) monitor.synchronize(&) end |