summaryrefslogtreecommitdiff
path: root/src/envfs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/envfs.h')
-rw-r--r--src/envfs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/envfs.h b/src/envfs.h
index 8790b071..bbc27005 100644
--- a/src/envfs.h
+++ b/src/envfs.h
@@ -128,6 +128,15 @@ private:
thread = std::thread([&]{ run(); });
}
+ ~ThreadInfo()
+ {
+ if (thread.joinable()) {
+ stop = true;
+ wakeup();
+ thread.join();
+ }
+ }
+
void wakeup()
{
{