From 143c47ed3311fa1d16976774e76c04c550750a43 Mon Sep 17 00:00:00 2001 From: Gary Krige Date: Wed, 6 Sep 2017 16:18:06 +0200 Subject: [PATCH] Use queue if provided in kwargs Fix for a new Queue being instantiated regardless of whether a queue is passed in or not. --- pubsub/google/cloud/pubsub_v1/subscriber/policy/thread.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubsub/google/cloud/pubsub_v1/subscriber/policy/thread.py b/pubsub/google/cloud/pubsub_v1/subscriber/policy/thread.py index df0f965748de..bdca8dec004b 100644 --- a/pubsub/google/cloud/pubsub_v1/subscriber/policy/thread.py +++ b/pubsub/google/cloud/pubsub_v1/subscriber/policy/thread.py @@ -61,7 +61,7 @@ def __init__(self, client, subscription, flow_control=types.FlowControl(), # Create a queue for keeping track of shared state. if queue is None: queue = Queue() - self._request_queue = Queue() + self._request_queue = queue # Call the superclass constructor. super(Policy, self).__init__(