From 6d1bbc389df1aa312c0ad39efdfe74d9ba08a66b Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 1 Jun 2017 17:57:23 -0700 Subject: [PATCH] use a sleep instead of a yield waiting for close event --- interface/src/Application.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 41b0bcaf04..27c158322d 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -11,6 +11,7 @@ #include "Application.h" +#include #include #include @@ -1747,8 +1748,8 @@ Application::~Application() { // make sure that the quit event has finished sending before we take the application down auto closeEventSender = DependencyManager::get(); while (!closeEventSender->hasFinishedQuitEvent() && !closeEventSender->hasTimedOutQuitEvent()) { - // yield so we're not spinning - std::this_thread::yield(); + // sleep a little so we're not spinning at 100% + std::this_thread::sleep_for(std::chrono::milliseconds(10)); } // quit the thread used by the closure event sender closeEventSender->thread()->quit();