Skip to content

Commit

Permalink
Fix docstring of loop.shutdown_default_executor (#535)
Browse files Browse the repository at this point in the history
Ref: python/cpython@575a253

Signed-off-by: Jens Reidel <adrian@travitia.xyz>
Co-authored-by: Fantix King <fantix.king@gmail.com>
  • Loading branch information
Gelbpunkt and fantix committed Oct 15, 2023
1 parent 5c500ee commit 919da56
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions uvloop/loop.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down

0 comments on commit 919da56

Please sign in to comment.