From ed15e569dc02c485f1d1373e26e6b760e1c5ac82 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 2 May 2022 12:59:23 +0100 Subject: Always call get on future, as wait doesn't throw the stored exception --- netfs/fuse/fuseFiles.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/netfs/fuse/fuseFiles.cpp b/netfs/fuse/fuseFiles.cpp index d2aae51..55fdcf5 100644 --- a/netfs/fuse/fuseFiles.cpp +++ b/netfs/fuse/fuseFiles.cpp @@ -29,7 +29,7 @@ namespace NetFS { return bg; }(); for (const auto & w : cbg) { - w.second->future.wait(); + w.second->future.get(); } } @@ -41,8 +41,7 @@ namespace NetFS { return bg.empty() ? nullptr : bg.begin()->second; }; while (auto w = first()) { - // background operations are void, so no need to actually get the return value - w->future.wait(); + w->future.get(); } } -- cgit v1.2.3