Module | SystemTimer |
In: |
lib/system_timer/concurrent_timer_pool.rb
lib/system_timer/thread_timer.rb lib/system_timer.rb lib/system_timer_stub.rb |
Timer based on underlying ITIMER_REAL system timer. It is a solution to Ruby processes which hang beyond the time limit when accessing external resources. This is useful when timeout.rb, which relies on green threads, does not work consistently.
For more information and background check out:
require 'systemtimer' SystemTimer.timeout_after(5) do # Something that should be interrupted if it takes too much time... # ... even if blocked on a system call! end
timeout_after | -> | timeout |
Backward compatibility with timeout.rb | ||
timeout_after | -> | timeout |
Backward compatibility with timeout.rb |
timer_pool | [R] |