fix(tvix/store): FuseDaemon unmount is blocking async runtime
The unmount method in FuseDaemon calls join on a bunch of threads and that is a blocking call but it is called from an async context in the tvix-store binary. This change wraps the call to unmount in a spawn_blocking. Change-Id: If89183b4a3f890874e75f5faf90cd24cb18da1e1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9489 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com>
This commit is contained in:
parent
f5a33ab15f
commit
5c2cad0ac4
1 changed files with 1 additions and 1 deletions
|
@ -350,7 +350,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
tokio::spawn(async move {
|
||||
tokio::signal::ctrl_c().await.unwrap();
|
||||
info!("interrupt received, unmounting…");
|
||||
fuse_daemon.unmount()?;
|
||||
tokio::task::spawn_blocking(move || fuse_daemon.unmount()).await??;
|
||||
info!("unmount occured, terminating…");
|
||||
Ok::<_, io::Error>(())
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue