Skip to content
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
Adding comment about gRPC stubs context managers.
In particular, explaining why we __enter__ them but
have no corresponding __enter__ for our users.
  • Loading branch information
dhermes committed Nov 16, 2015
commit 9cd70229cc78d96ea4f71ac8bed80ab51adbde4d
5 changes: 5 additions & 0 deletions gcloud/bigtable/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,11 @@ def start(self):
if self.is_started():
return

# NOTE: We __enter__ the stubs more-or-less permanently. This is
# because only after entering the context managers is the
# connection created. We don't want to immediately close
# those connections since the client will make many
# requests with it over HTTP/2.
self._data_stub = self._make_data_stub()
self._data_stub.__enter__()

This comment was marked as spam.

This comment was marked as spam.

if self._admin:
Expand Down