1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-04-30 15:49:41 +02:00

bug2437 complete fix: Sleep 100 ms at startup...

... The reported continuing failure to fix bug 2437 -- sometimes -- appears to
have been a timing problem.  I could observe it often with release builds but
not with debug.
This commit is contained in:
Paul Licameli 2020-12-03 23:46:43 -05:00
parent 58df1342c2
commit a675b5907f

View File

@ -146,6 +146,8 @@ It handles initialization and termination by subclassing wxApp.
#include "../images/AudacityLogoWithName.xpm"
#endif
#include <thread>
////////////////////////////////////////////////////////////
/// Custom events
@ -1276,6 +1278,8 @@ bool AudacityApp::OnInit()
// opened. So use CallAfter() to delay the rest of initialization.
// See CreateSingleInstanceChecker() where we send those paths over a
// socket to the prior instance.
using namespace std::chrono;
std::this_thread::sleep_for(100ms);
CallAfter([this]{
if (!InitPart2())
exit(-1);