Skip to content

Commit

Permalink
add bridge wait
Browse files Browse the repository at this point in the history
  • Loading branch information
andre-merzky committed Oct 15, 2024
1 parent 42f5041 commit bb3eb71
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/radical/utils/zmq/bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,21 @@ def start(self):
self._log.info('started bridge %s', self._uid)


# --------------------------------------------------------------------------
#
def wait(self, timeout=None):
'''
wait for the bridge to terminate. If `timeout` is set, the call will
return after that many seconds, with a return value indicating whether
the bridge is still alive.
'''

self._bridge_thread.join(timeout=timeout)

if timeout is not None:
return not self._bridge_thread.is_alive()


# --------------------------------------------------------------------------
#
@staticmethod
Expand Down

0 comments on commit bb3eb71

Please sign in to comment.