Keeping references in-process sockets for graceful exit #2069
Unanswered
jacopoabramo
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm currently implementing an
in-procpublisher-subscriber pattern usingzmq.devices.ThreadDevice. A working example is presented below:The
VirtualBusholds a weak reference to publisher sockets so that they can be manually closed whenshutdownis called.This script works as intended, but it feels a bit unbalanced. Subscriber sockets are automatically closed when
zmq.ContextTerminatedis raised, and I wanted to know if there's a similar mechanism to also close publisher sockets in a similar fashion so that I don't have to keep references to them.Beta Was this translation helpful? Give feedback.
All reactions