bpo-39609: set the thread_name_prefix for the default asyncio executor (GH-18458)
Just a small debugging improvement to identify the asyncio executor threads.
diff --git a/Lib/asyncio/base_events.py b/Lib/asyncio/base_events.py
index d78724b..b2d446a 100644
--- a/Lib/asyncio/base_events.py
+++ b/Lib/asyncio/base_events.py
@@ -806,7 +806,9 @@
# Only check when the default executor is being used
self._check_default_executor()
if executor is None:
- executor = concurrent.futures.ThreadPoolExecutor()
+ executor = concurrent.futures.ThreadPoolExecutor(
+ thread_name_prefix='asyncio'
+ )
self._default_executor = executor
return futures.wrap_future(
executor.submit(func, *args), loop=self)