zeromq / czmq

High-level C binding for ØMQ
czmq.zeromq.org
Mozilla Public License 2.0
1.16k stars 523 forks source link

zloop: ensure zsys_init() when creating zloop #2286

Closed oko256 closed 2 months ago

oko256 commented 2 months ago

If no sockets or actors are used in zloop, zsys_init() does not get run and zsys interrupt handler does not get initialized. This means that interrupts will not work correctly in zloop if, for example, only timers are used. zsys_init() is safe to call multiple times, so we ensure that it's called when new zloop instance is created.

sphaero commented 2 months ago

thnx!