[zeromq-dev] Java API is not notifed of C++ assert failures.
holger at wizards.de
Sat Apr 11 22:28:17 CEST 2009
Martin Sustrik wrote:
> It aborts the process, as it should, [..]
I understand the intended motivation for this behaviour, but nevertheless
disagree with it. It makes integration of zmq into more complex Java (or
even C/C++) scenarios almost impossible and at best a high risk
proposition, as the library can arbitrarily terminate the JVM and any
other services it runs.
A brief inspection leads me to believe that the zmq_error_handler is not
responsible for the asserts but only reconnection, correct? IMHO it might
be much more acceptable in a wider range of use cases to allow a pluggable
assertion handler as well (zmq_set_failure_handler?), which should allow
clean shutdown and restart of the entire zmq subsystem, without making
assumptions about the lifetime of the containing process.
Can you say if this would be possible at all?
More information about the zeromq-dev