From 47867d427f46a8478aa0107738adab1bfbfc7c56 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Fri, 17 Apr 2020 10:23:10 -0400 Subject: fixed crash when switching to an instance with a lower refresh thread count fixed rare race condition when waking up handle closer threads --- src/envfs.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/envfs.cpp') diff --git a/src/envfs.cpp b/src/envfs.cpp index a67faf84..4aaef082 100644 --- a/src/envfs.cpp +++ b/src/envfs.cpp @@ -173,7 +173,11 @@ public: void wakeup() { - m_ready = true; + { + std::unique_lock lock(m_mutex); + m_ready = true; + } + m_cv.notify_one(); } -- cgit v1.3.1