Merge remote-tracking branch 'Aleric/master' into Cupcake

This commit is contained in:
Drake Arconis
2013-03-11 19:55:38 -04:00
47 changed files with 1925 additions and 1178 deletions

View File

@@ -234,6 +234,9 @@ extern BOOL gRandomizeFramerate;
extern BOOL gPeriodicSlowFrame;
extern BOOL gDebugGL;
extern void startEngineThread(void);
extern void stopEngineThread(void);
////////////////////////////////////////////////////////////
// All from the last globals push...
const F32 DEFAULT_AFK_TIMEOUT = 5.f * 60.f; // time with no input before user flagged as Away From Keyboard
@@ -657,7 +660,7 @@ bool LLAppViewer::init()
mAlloc.setProfilingEnabled(gSavedSettings.getBOOL("MemProfiling"));
AIStateMachine::setMaxCount(gSavedSettings.getU32("StateMachineMaxTime"));
AIEngine::setMaxCount(gSavedSettings.getU32("StateMachineMaxTime"));
{
AIHTTPTimeoutPolicy policy_tmp(
@@ -1824,6 +1827,7 @@ bool LLAppViewer::cleanup()
llinfos << "Message system deleted." << llendflush;
LLApp::stopErrorThread(); // The following call is not thread-safe. Have to stop all threads.
stopEngineThread();
AICurlInterface::cleanupCurl();
// Cleanup settings last in case other classes reference them.
@@ -1901,6 +1905,9 @@ bool LLAppViewer::initThreads()
LLWatchdog::getInstance()->init(watchdog_killer_callback);
}
// State machine thread.
startEngineThread();
AICurlInterface::startCurlThread(gSavedSettings.getU32("CurlMaxTotalConcurrentConnections"),
gSavedSettings.getU32("CurlConcurrentConnectionsPerHost"),
gSavedSettings.getBOOL("NoVerifySSLCert"));
@@ -3854,7 +3861,7 @@ void LLAppViewer::idle()
{
LLFastTimer t(FTM_STATEMACHINE);
AIStateMachine::mainloop();
gMainThreadEngine.mainloop();
}
// Must wait until both have avatar object and mute list, so poll