Skip to content

Commit

Permalink
Adding thread prefix for ThreadPoolExecutor in Pub/Sub.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhermes committed Nov 29, 2017
1 parent 5f059f0 commit 51a5f0a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pubsub/google/cloud/pubsub_v1/subscriber/policy/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ def __init__(self, client, subscription, flow_control=types.FlowControl(),
# Also maintain a request queue and an executor.
_LOGGER.debug('Creating callback requests thread (not starting).')
if executor is None:
executor = futures.ThreadPoolExecutor(max_workers=10)
executor = futures.ThreadPoolExecutor(
max_workers=10,
thread_name_prefix='ThreadPoolExecutor-SubscriberPolicy',
)
self._executor = executor
self._callback_requests = _helper_threads.QueueCallbackThread(
self._request_queue,
Expand Down

0 comments on commit 51a5f0a

Please sign in to comment.