-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make run_as_sync safe to use if runtime is present
Summary: The issue with the way we use block_on() is that it tries to unconditionally create new Tokio runtime and panics if there is one already (because nested runtimes are not allowed). Here if the runtime is present, we reuse it instead of creating a new one. Reviewed By: ndmitchell Differential Revision: D61635145 fbshipit-source-id: caed839c5e42ddf222d6770b1d3949228beb32c5
- Loading branch information
1 parent
8d24251
commit 8cc88c3
Showing
3 changed files
with
33 additions
and
5 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