mirror of
https://github.com/debauchee/barrier.git
synced 2026-07-08 04:46:26 +08:00
added some hacky sleeps to temporarily fix some thread timing issues (causing access violations). the best fix would be to use wait cond vars, but first we need to really understand the bug.
This commit is contained in:
@@ -61,7 +61,6 @@
|
||||
|
||||
CClientApp::CClientApp(IEventQueue* events, CreateTaskBarReceiverFunc createTaskBarReceiver) :
|
||||
CApp(events, createTaskBarReceiver, new CArgs()),
|
||||
m_events(events),
|
||||
s_client(NULL),
|
||||
s_clientScreen(NULL)
|
||||
{
|
||||
@@ -535,12 +534,17 @@ CClientApp::mainLoop()
|
||||
// later. the timer installed by startClient() will take care of
|
||||
// that.
|
||||
DAEMON_RUNNING(true);
|
||||
|
||||
|
||||
#if defined(MAC_OS_X_VERSION_10_7)
|
||||
|
||||
CThread thread(
|
||||
new TMethodJob<CClientApp>(
|
||||
this, &CClientApp::runEventsLoop,
|
||||
NULL));
|
||||
|
||||
// HACK: sleep, allow queue to start.
|
||||
ARCH->sleep(1);
|
||||
|
||||
runCocoaApp();
|
||||
#else
|
||||
m_events->loop();
|
||||
@@ -626,10 +630,3 @@ CClientApp::startNode()
|
||||
m_bye(kExitFailed);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CClientApp::runEventsLoop(void*)
|
||||
{
|
||||
m_events->cacheCurrentEventQueueRef();
|
||||
m_events->loop();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user