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.
This commit is contained in:
parent
02a4d57263
commit
374d998b50
|
@ -806,7 +806,9 @@ class BaseEventLoop(events.AbstractEventLoop):
|
||||||
# Only check when the default executor is being used
|
# Only check when the default executor is being used
|
||||||
self._check_default_executor()
|
self._check_default_executor()
|
||||||
if executor is None:
|
if executor is None:
|
||||||
executor = concurrent.futures.ThreadPoolExecutor()
|
executor = concurrent.futures.ThreadPoolExecutor(
|
||||||
|
thread_name_prefix='asyncio'
|
||||||
|
)
|
||||||
self._default_executor = executor
|
self._default_executor = executor
|
||||||
return futures.wrap_future(
|
return futures.wrap_future(
|
||||||
executor.submit(func, *args), loop=self)
|
executor.submit(func, *args), loop=self)
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Add thread_name_prefix to default asyncio executor
|
Loading…
Reference in New Issue