-
Notifications
You must be signed in to change notification settings - Fork 6
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
add callbacks to pulling end of pipe #428
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## devel #428 +/- ##
==========================================
+ Coverage 61.56% 61.58% +0.02%
==========================================
Files 62 62
Lines 6980 7015 +35
==========================================
+ Hits 4297 4320 +23
- Misses 2683 2695 +12 ☔ View full report in Codecov by Sentry. |
This is ready for review now. Thanks! |
src/radical/utils/zmq/pipe.py
Outdated
self._url = None | ||
self._log = log | ||
self._sock = None | ||
self._poller = zmq.Poller() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the poller
: For the PUSH
mode, we don't need a Poller since we are only sending messages (and the socket doesn't need to wait for incoming messages), correct?
So maybe something like this:
if mode == MODE_PUSH:
self._connect_push(url)
self._poller = None
elif mode == MODE_PULL:
self._connect_pull(url)
self._poller = zmq.Poller()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andre-merzky, did you see this comment? I am unsure if you agree on this (it is a minor change). Besides this, the PR looks good to me.
This PR adds callbacks to the pull end of a pipe. That is used in RP to efficiently implement component startup checks.
The PR also cleans up some log messages and improves thread termination.