-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't use static for async event loop
Summary: We're seeing occasional timouts and the warning "DeprecationWarning: There is no current event loop" in the asyncio tests. We're also seeing "asyncio.run() creates a new event loop, runs the given coroutine on it, and closes the loop when the coroutine completes. This is the recommended way to run asynchronous code in Python)", which exposes the issue that we should not use a static for the loop, as we're then getting "RuntimeError: Event loop is closed" when the test is run the second time. Reviewed By: jtbraun Differential Revision: D67836792 fbshipit-source-id: be3fdfd3208cdd3f0be8762a1d3316d9641c5d13
- Loading branch information
1 parent
4218510
commit 71865ff
Showing
3 changed files
with
15 additions
and
21 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
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