diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2026-08-13 04:19:15 +0300 |
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2026-08-13 04:19:15 +0300 |
| commit | f376c52ee2a22b3b58263d86566394e80626fc1a (patch) | |
| tree | 012d0585b39ef5cd1eac25f4f783d930ff50dff6 /indra/llcommon/llthread.cpp | |
| parent | 21bb60fc65e7fa6c3cf472a29cda220f653af1d8 (diff) | |
| parent | e3a92a3f8e7d6df3772adcecb037149e6fcf0f3e (diff) | |
Merge branch 'geenz/linux-to-develop' into marchcat/lua-linux-develop
# Conflicts:
# .github/workflows/build.yaml
# indra/llinventory/llinventory.cpp
# indra/newview/CMakeLists.txt
# indra/newview/llappviewer.cpp
# indra/newview/llappviewerwin32.cpp
# indra/newview/llviewermenu.cpp
# indra/newview/llvoiceclient.cpp
# indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml
Diffstat (limited to 'indra/llcommon/llthread.cpp')
| -rw-r--r-- | indra/llcommon/llthread.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp index bae80a3fb9..277edcb6a2 100644 --- a/indra/llcommon/llthread.cpp +++ b/indra/llcommon/llthread.cpp @@ -310,11 +310,13 @@ void LLThread::shutdown() // The thread isn't already stopped // First, set the flag that indicates that we're ready to die setQuitting(); + if (!isStopped()) + { + // Give the thread a chance to update status. + yield(); + } //LL_INFOS() << "LLThread::~LLThread() Killing thread " << mName << " Status: " << mStatus << LL_ENDL; - // Now wait a bit for the thread to exit - // It's unclear whether I should even bother doing this - this destructor - // should never get called unless we're already stopped, really... S32 counter = 0; const S32 MAX_WAIT = 600; while (counter < MAX_WAIT) @@ -323,9 +325,9 @@ void LLThread::shutdown() { break; } - // Sleep for a tenth of a second - ms_sleep(100); - yield(); + // Sleep for 10ms, 6 seconds total, then give up and kill the thread + // Warning: This can be called from the main thread + ms_sleep(10); counter++; } } |
