Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create and close ZMQ sockets on utilizing thread #3774

Merged
merged 1 commit into from
Feb 15, 2025

Conversation

khk-globus
Copy link
Collaborator

@khk-globus khk-globus commented Feb 13, 2025

The ZMQ documentation is quite clear about not sharing ZMQ sockets between threads. This case wasn't so much shared as simply created on the main thread and used in the child threads. "Probably" okay, and hasn't appeared to have bitten us to date ... regardless, be cleaner, and in so doing recognize that these aren't actually class variables.

Changed Behaviour

Slightly different logging output, as the result and task ZMQ pipes are now connecting in different threads.

Type of change

  • Code maintenance/cleanup

The ZMQ documentation is quite clear about not sharing ZMQ sockets between
threads.  This case wasn't so much shared as simply created on the main thread
and _used_ in the child threads.  "Probably" okay, and hasn't appeared to have
bitten us to date ... regardless, be cleaner, and in so doing recognize that
these aren't actually class variables.
@khk-globus khk-globus force-pushed the ppw_threadwise_zmq_socks branch from ee2f975 to efe9b93 Compare February 14, 2025 03:09
@benclifford benclifford added this pull request to the merge queue Feb 15, 2025
Merged via the queue into master with commit 487a784 Feb 15, 2025
9 checks passed
@benclifford benclifford deleted the ppw_threadwise_zmq_socks branch February 15, 2025 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants