Skip to content

Commit d9d31c9

Browse files
committed
bpo-39609: set the thread_name_prefix for the default asyncio executor
1 parent 4eb9f43 commit d9d31c9

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Lib/asyncio/base_events.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,9 @@ def run_in_executor(self, executor, func, *args):
806806
# Only check when the default executor is being used
807807
self._check_default_executor()
808808
if executor is None:
809-
executor = concurrent.futures.ThreadPoolExecutor()
809+
executor = concurrent.futures.ThreadPoolExecutor(
810+
thread_name_prefix='asyncio'
811+
)
810812
self._default_executor = executor
811813
return futures.wrap_future(
812814
executor.submit(func, *args), loop=self)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add thread_name_prefix to default asyncio executor

0 commit comments

Comments
 (0)