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

fix(api_core): finalize during close of 'ResumableBidiRpc'. #9337

Merged
merged 3 commits into from
Oct 2, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add comment explaining the timeout to 'thread.join'.
  • Loading branch information
tseaver committed Sep 27, 2019
commit 1ec9a37f0d94b3a90a08714a92373e35959c78d0
2 changes: 2 additions & 0 deletions api_core/google/api_core/bidi.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,8 @@ def stop(self):
if self._thread is not None:
# Resume the thread to wake it up in case it is sleeping.
self.resume()
# The daemonized thread may itself block, so don't wait
# for it longer than a second.
self._thread.join(1.0)
if self._thread.is_alive():
_LOGGER.warning("Background thread did not exit.")
Expand Down