summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--netfs/fuse/fuseFiles.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/netfs/fuse/fuseFiles.cpp b/netfs/fuse/fuseFiles.cpp
index e56ce0b..b8eb014 100644
--- a/netfs/fuse/fuseFiles.cpp
+++ b/netfs/fuse/fuseFiles.cpp
@@ -28,8 +28,11 @@ FuseApp::getMap<FuseApp::OpenFilePtr>()
void
FuseApp::OpenFile::wait() const
{
- SharedLock(_lock);
- for (const auto & w : bg) {
+ auto cbg = [this](){
+ SharedLock(_lock);
+ return bg;
+ }();
+ for (const auto & w : cbg) {
w.second->future.wait();
}
}