Begin work on sync...

This commit is contained in:
Alex Auvolat
2020-04-16 14:50:49 +02:00
parent 43ce5e4ab4
commit f01c1e71b5
9 changed files with 289 additions and 86 deletions
+1 -3
View File
@@ -76,9 +76,7 @@ async fn handler(
// and the request handler simply sits there waiting for the task to finish.
// (if it's cancelled, that's not an issue)
// (TODO FIXME except if garage happens to shut down at that point)
let write_fut = async move {
garage.block_manager.write_block(&m.hash, &m.data).await
};
let write_fut = async move { garage.block_manager.write_block(&m.hash, &m.data).await };
tokio::spawn(write_fut).await?
}
Message::GetBlock(h) => garage.block_manager.read_block(&h).await,