-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
bpo-38267: Add thread timeout parameter to loop.shutdown_default_executor()
#16360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
700cf86
1e7794b
a262c45
b1bb810
8a4c30c
ebc1b99
5b90766
f189f04
16921a1
b678818
e332257
7f8428b
577b2b2
b673080
926de3f
f7c623c
169d2d4
f0dde2d
b7c0608
1e95afb
2b1f35d
e549996
8a5121c
4264c04
e9a0f19
d9c2e37
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -568,8 +568,9 @@ async def shutdown_default_executor(self, timeout=None): | |
thread.join(timeout) | ||
|
||
if (thread.is_alive()): | ||
warnings.Warning("The ThreadPoolExecutor did not finishing joining" | ||
f"its threads within {timeout} seconds.") | ||
warnings.warn("The ThreadPoolExecutor did not finishing joining" | ||
f"its threads within {timeout} seconds.", | ||
RuntimeWarning) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @1st1 Couple of questions regarding the warning:
Edit: Regarding the test, I don't think there's a way to test for this without creating a dangling thread due to the nature of the warning. Personally, I don't think it's worth adding an intentional resource leak to the asyncio regression tests just to test the functionality of a single warning. If there's another way to test for the warning without creating a dangling thread, let me know. |
||
self._default_executor.shutdown(wait=False) | ||
|
||
def _do_shutdown(self, future): | ||
|
Uh oh!
There was an error while loading. Please reload this page.