Fix docstring of loop.shutdown_default_executor (#535)

Ref: 575a253b5c

Signed-off-by: Jens Reidel <adrian@travitia.xyz>
Co-authored-by: Fantix King <fantix.king@gmail.com>
This commit is contained in:
Jens Reidel 2023-10-15 19:28:17 +02:00 committed by GitHub
parent 5c500ee257
commit 919da56750
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -3201,7 +3201,12 @@ cdef class Loop:
@cython.iterable_coroutine
async def shutdown_default_executor(self, timeout=None):
"""Schedule the shutdown of the default executor."""
"""Schedule the shutdown of the default executor.
The timeout parameter specifies the amount of time the executor will
be given to finish joining. The default value is None, which means
that the executor will be given an unlimited amount of time.
"""
self._executor_shutdown_called = True
if self._default_executor is None:
return
@ -3214,7 +3219,7 @@ cdef class Loop:
thread.join(timeout)
if thread.is_alive():
warnings.warn(
warnings_warn(
"The executor did not finishing joining "
f"its threads within {timeout} seconds.",
RuntimeWarning,