Class: Uh::WM::Workers::KQueue
Constant Summary collapse
- TIMEOUT_DEFAULT =
1
Constants inherited from Base
Instance Method Summary collapse
-
#initialize(timeout: TIMEOUT_DEFAULT) ⇒ KQueue
constructor
A new instance of KQueue.
- #work_events ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(timeout: TIMEOUT_DEFAULT) ⇒ KQueue
Returns a new instance of KQueue.
9 10 11 12 |
# File 'lib/uh/wm/workers/kqueue.rb', line 9 def initialize timeout: TIMEOUT_DEFAULT super @timeout = timeout * 1000 end |
Instance Method Details
#work_events ⇒ Object
14 15 16 17 |
# File 'lib/uh/wm/workers/kqueue.rb', line 14 def work_events @before_watch.call if @before_watch queue.run end |