-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor server spawning to be synchronous and infallible (#2097)
* Make simple server spawn methods synchronous Perform all IO operations in the spawned task. * Make gRPC server spawn synchronous Perform all IO operations in the spawned task. * Make gRPC server spawn infallible Return an error only from the spawned task. * Start metrics outside of `async` block There's no need to delay it. * Make `spawn_{grpc,simple}` infallible There aren't any failure scenarios for them. * Remove unnecessary bindings The fields can be cloned directly in the `async` block, just like what is done with the `server_config.internal_network` value. * Move out server `spawn` calls from `async` block There's no need to keep them in the block, now that they are synchronous. * Refactor to use `FuturesUnordered` Make it explicit that the order of the futures doesn't matter.
- Loading branch information
Showing
5 changed files
with
93 additions
and
103 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
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