diff --git a/src/mbgl/util/thread_pool.cpp b/src/mbgl/util/thread_pool.cpp index 94e1190693f..cc80dcd9cd1 100644 --- a/src/mbgl/util/thread_pool.cpp +++ b/src/mbgl/util/thread_pool.cpp @@ -42,15 +42,15 @@ std::thread ThreadedSchedulerBase::makeSchedulerThread(size_t index) { if (!terminated && !didWork) { cvAvailable.wait(conditionLock); } - + if (terminated) { platform::detachThread(); break; } - + // Let other threads run conditionLock.unlock(); - + didWork = false; std::vector> pending; {