chuckremes/zmqmachine — Issue #5: Exceptions raised inside timer blocks cause timers not to be renewed
Author: halorgium
Created: 2011-11-30 16:21:04+00:00
State: open

When two timers are running in the same reactor iteration and one of them raises an exception, neither timer is renewed.

require 'zmqmachine'

counter = 0
handler = lambda do |exception|
p [:exception, exception]
end

reactor = ZM::Reactor.new(:test, 10, exception_handler: handler)
reactor.run do
reactor.periodical_timer 10 do
p [:counter, counter]
counter += 1
end

reactor.periodical_timer 100 do
raise "Failed"
end
end
reactor.join

I'm not sure what the expected behaviour is.
Either way, the non-failing timer should be renewed.