FIX: Yield when join media thread
Change-Id: I746d7df88a0de8363da7d9507cb63c9e0ffe970a Jira: STUDIO-5952
This commit is contained in:
parent
022e9a24cb
commit
168d5dfe67
|
@ -23,6 +23,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <wx/clipbrd.h>
|
#include <wx/clipbrd.h>
|
||||||
|
#include "wx/evtloop.h"
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
namespace GUI {
|
namespace GUI {
|
||||||
|
@ -104,7 +105,9 @@ MediaPlayCtrl::~MediaPlayCtrl()
|
||||||
m_tasks.push_back("<exit>");
|
m_tasks.push_back("<exit>");
|
||||||
m_cond.notify_all();
|
m_cond.notify_all();
|
||||||
}
|
}
|
||||||
m_thread.join();
|
while (!m_thread.try_join_for(boost::chrono::milliseconds(10))) {
|
||||||
|
wxEventLoopBase::GetActive()->Yield();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString hide_id_middle_string(wxString const &str, size_t offset = 0, size_t length = -1)
|
wxString hide_id_middle_string(wxString const &str, size_t offset = 0, size_t length = -1)
|
||||||
|
|
Loading…
Reference in New Issue