-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Shutdown the loop's default thread executor at the end of a test (#504)
The same approach is adopted in IsolatedAsyncioTestCase. It prevents leaking asyncio threads as loop.close() doesn't join them. BaseEventLoop.shutdown_default_executor was introduced in Python 3.9. For earlier versions, this commit introduces an adapted version of the method: _shutdown_default_executor. However, it doesn't work with uvloop < 0.15.0 because, uvloop doesn't expose _default_executor attribute. It's rather a minor issue as uvloop 0.15.0 is 2 years old - in such case this commit is a no-op. Fixes #503.
- Loading branch information
1 parent
1b57189
commit ff5c811
Showing
2 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters