summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/base_events.py
diff options
context:
space:
mode:
authorMarkus Mohrhard <markusm@dug.com>2020-02-27 20:01:47 (GMT)
committerGitHub <noreply@github.com>2020-02-27 20:01:47 (GMT)
commit374d998b507d34a6c0a3816a163926a8ba0c483f (patch)
tree1c4edd7d514556850b6f7314b0a60f1c4e2b9300 /Lib/asyncio/base_events.py
parent02a4d57263a9846de35b0db12763ff9e7326f62c (diff)
downloadcpython-374d998b507d34a6c0a3816a163926a8ba0c483f.zip
cpython-374d998b507d34a6c0a3816a163926a8ba0c483f.tar.gz
cpython-374d998b507d34a6c0a3816a163926a8ba0c483f.tar.bz2
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.
Diffstat (limited to 'Lib/asyncio/base_events.py')
-rw-r--r--Lib/asyncio/base_events.py4
1 files changed, 3 insertions, 1 deletions
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 @@ class BaseEventLoop(events.AbstractEventLoop):
# 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)