diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-12-15 21:16:26 +0200 |
|---|---|---|
| committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-12-15 21:16:47 +0200 |
| commit | 7c1cd47772ac7a19534770d6e7479f6e907a181c (patch) | |
| tree | cb5b5a38cad8f90bca4f0770c0048cca4d1e35a3 /indra/llcommon/llapp.cpp | |
| parent | ac54b72974f3d00d0e02fdc5aec86f1e632df76d (diff) | |
| parent | 0a873cd95547f003878c6d00d0883ff792f4a865 (diff) | |
Merge branch 'master' (DRTVWR-552) into DRTVWR-527-maint
# Conflicts:
# indra/media_plugins/cef/media_plugin_cef.cpp - setOnLoadEndCallback
# indra/newview/llviewerassetstorage.cpp - mAssetCoroCount
Diffstat (limited to 'indra/llcommon/llapp.cpp')
| -rw-r--r-- | indra/llcommon/llapp.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/llcommon/llapp.cpp b/indra/llcommon/llapp.cpp index df2a066f62..8ddd132793 100644 --- a/indra/llcommon/llapp.cpp +++ b/indra/llcommon/llapp.cpp @@ -106,7 +106,8 @@ BOOL LLApp::sDisableCrashlogger = FALSE; BOOL LLApp::sLogInSignal = FALSE; // static -LLApp::EAppStatus LLApp::sStatus = LLApp::APP_STATUS_STOPPED; // Keeps track of application status +// Keeps track of application status +LLScalarCond<LLApp::EAppStatus> LLApp::sStatus{LLApp::APP_STATUS_STOPPED}; LLAppErrorHandler LLApp::sErrorHandler = NULL; BOOL LLApp::sErrorThreadRunning = FALSE; @@ -452,7 +453,8 @@ static std::map<LLApp::EAppStatus, const char*> statusDesc // static void LLApp::setStatus(EAppStatus status) { - sStatus = status; + // notify everyone waiting on sStatus any time its value changes + sStatus.set_all(status); // This can also happen very late in the application lifecycle -- don't // resurrect a deleted LLSingleton @@ -514,28 +516,28 @@ void LLApp::setStopped() // static bool LLApp::isStopped() { - return (APP_STATUS_STOPPED == sStatus); + return (APP_STATUS_STOPPED == sStatus.get()); } // static bool LLApp::isRunning() { - return (APP_STATUS_RUNNING == sStatus); + return (APP_STATUS_RUNNING == sStatus.get()); } // static bool LLApp::isError() { - return (APP_STATUS_ERROR == sStatus); + return (APP_STATUS_ERROR == sStatus.get()); } // static bool LLApp::isQuitting() { - return (APP_STATUS_QUITTING == sStatus); + return (APP_STATUS_QUITTING == sStatus.get()); } // static |
