summaryrefslogtreecommitdiff
path: root/indra/llcommon/llworkerthread.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2023-06-01 09:56:41 -0400
committerNat Goodspeed <nat@lindenlab.com>2023-06-01 09:56:41 -0400
commit7d05ade3f10563e8c202106e00cb3d273ab13338 (patch)
tree349ecda36a5a561d6e564e2cc3db39121fd8946b /indra/llcommon/llworkerthread.cpp
parented92f1d8034dcaa84f808b3267c772202e7ce113 (diff)
parent5a70639b7992842a9f74ec81b11bac56608b8f2e (diff)
SL-18330: Merge branch 'main' of secondlife/viewer into xcode-14.3
Diffstat (limited to 'indra/llcommon/llworkerthread.cpp')
-rw-r--r--indra/llcommon/llworkerthread.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/indra/llcommon/llworkerthread.cpp b/indra/llcommon/llworkerthread.cpp
index 97838e296e..e5eda1eac7 100644
--- a/indra/llcommon/llworkerthread.cpp
+++ b/indra/llcommon/llworkerthread.cpp
@@ -69,11 +69,11 @@ void LLWorkerThread::clearDeleteList()
<< " entries in delete list." << LL_ENDL;
mDeleteMutex->lock();
- for (delete_list_t::iterator iter = mDeleteList.begin(); iter != mDeleteList.end(); ++iter)
+ for (LLWorkerClass* worker : mDeleteList)
{
- (*iter)->mRequestHandle = LLWorkerThread::nullHandle();
- (*iter)->clearFlags(LLWorkerClass::WCF_HAVE_WORK);
- delete *iter ;
+ worker->mRequestHandle = LLWorkerThread::nullHandle();
+ worker->clearFlags(LLWorkerClass::WCF_HAVE_WORK);
+ delete worker;
}
mDeleteList.clear() ;
mDeleteMutex->unlock() ;
@@ -108,15 +108,12 @@ size_t LLWorkerThread::update(F32 max_time_ms)
}
mDeleteMutex->unlock();
// abort and delete after releasing mutex
- for (std::vector<LLWorkerClass*>::iterator iter = abort_list.begin();
- iter != abort_list.end(); ++iter)
+ for (LLWorkerClass* worker : abort_list)
{
- (*iter)->abortWork(false);
+ worker->abortWork(false);
}
- for (std::vector<LLWorkerClass*>::iterator iter = delete_list.begin();
- iter != delete_list.end(); ++iter)
+ for (LLWorkerClass* worker : delete_list)
{
- LLWorkerClass* worker = *iter;
if (worker->mRequestHandle)
{
// Finished but not completed
@@ -124,7 +121,7 @@ size_t LLWorkerThread::update(F32 max_time_ms)
worker->mRequestHandle = LLWorkerThread::nullHandle();
worker->clearFlags(LLWorkerClass::WCF_HAVE_WORK);
}
- delete *iter;
+ delete worker;
}
// delete and aborted entries mean there's still work to do
res += delete_list.size() + abort_list.size();