Skip to content

Commit c377b3c

Browse files
committed
Actually "turning off" all threads.
1 parent 2790089 commit c377b3c

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • pubsub/google/cloud/pubsub_v1/subscriber/policy

pubsub/google/cloud/pubsub_v1/subscriber/policy/thread.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,10 @@ def close(self):
151151
# Stop consuming messages.
152152
self._request_queue.put(_helper_threads.STOP)
153153
self._dispatch_thread.join() # Wait until stopped.
154+
self._dispatch_thread = None
154155
self._consumer.stop_consuming()
156+
self._leases_thread.join()
157+
self._leases_thread = None
155158
self._executor.shutdown()
156159

157160
# The subscription is closing cleanly; resolve the future if it is not

0 commit comments

Comments
 (0)