forked from rust-lang/docs.rs
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to one single runtime for S3 storage
Changed S3Backend::start_storage_transaction from creating a new Runtime on each call to using a lazily-initialized global runtime for all S3 instances to use. Since Tokio v0.1's Runtime has no mechanism to allow for blocking that doesn't require an &mut self, the runtime is stored inside of a mutex to allow for mutable access. We're already transitively dependent on parking_lot v0.10.2, so this is just adding it as a direct dependency (Removing tokio v0.2 will remove the other) version of parking_lot we depend on). When upgrading to tokio v0.2 this should be changed since v0.2 has the Runtime::handle method which allows runtime access from only &self.
- Loading branch information
Showing
3 changed files
with
10 additions
and
6 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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