Skip to content

Commit

Permalink
Update quantum_run_stream to not prefetch first result (quantumlib#5024)
Browse files Browse the repository at this point in the history
Review: @wcourtney
  • Loading branch information
maffoo authored and 95-martin-orion committed Mar 2, 2022
1 parent 72f140b commit 9fb7c1a
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2106,6 +2106,9 @@ def quantum_run_stream(
default_timeout=self._method_configs['QuantumRunStream'].timeout,
client_info=self._client_info,
)
# Don't prefetch first result from stream, since this will cause deadlocks.
# See https://github.com/googleapis/python-api-core/pull/30
self.transport.quantum_run_stream._prefetch_first_result_ = False

return self._inner_api_calls['quantum_run_stream'](
requests, retry=retry, timeout=timeout, metadata=metadata
Expand Down

0 comments on commit 9fb7c1a

Please sign in to comment.