-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ocicrypt-rs/image-rs: make ttrpc keyprovider client sync
The original ttrpc keyprovider client is marked `async`, but we use it as sync version by fork a new thread and create a new tokio runtime. This commit changes the client into sync version, this will match the original usage. Why we need this commit is the original fork-thread-and-tokio-runtime way would create a dead lock for CDH's image-pull API when an encrypted image is pulled. When we bring in a tokio::spawn_blocking in image-rs, the tokio runtime would have possibility to switch context thus a dead lock can be avoided. Signed-off-by: Xynnn007 <xynnn@linux.alibaba.com>
- Loading branch information
Showing
4 changed files
with
42 additions
and
72 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