mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-08-08 14:49:01 +08:00
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
|
||||
|
||||
#include <wx/clipbrd.h>
|
||||
#include "wx/evtloop.h"
|
||||
|
||||
namespace Slic3r {
|
||||
namespace GUI {
|
||||
@ -104,7 +105,9 @@ MediaPlayCtrl::~MediaPlayCtrl()
|
||||
m_tasks.push_back("<exit>");
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user