summaryrefslogtreecommitdiff
path: root/indra/llcommon/llthread.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2018-03-02 13:00:18 +0000
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2018-03-02 13:00:18 +0000
commit9f8c6ace4a72c6a44d062df15d78c123772a72c0 (patch)
tree500492208cabd8d896c19a88cf5bf7eddf66eeab /indra/llcommon/llthread.cpp
parent28b95e4975f2333c0eb590b29740c3ce491a934d (diff)
parentf8c76535a35aaf245e261357a59e977bac5b2501 (diff)
merge
Diffstat (limited to 'indra/llcommon/llthread.cpp')
-rw-r--r--indra/llcommon/llthread.cpp58
1 files changed, 20 insertions, 38 deletions
diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp
index 00acfd1e4c..32e8ea9682 100644
--- a/indra/llcommon/llthread.cpp
+++ b/indra/llcommon/llthread.cpp
@@ -129,50 +129,32 @@ void *APR_THREAD_FUNC LLThread::staticRun(apr_thread_t *apr_threadp, void *datap
sThreadID = threadp->mID;
- try
+ // Run the user supplied function
+ do
{
- // Run the user supplied function
- do
+ try
{
- try
- {
- threadp->run();
- }
- catch (const LLContinueError &e)
- {
- LL_WARNS("THREAD") << "ContinueException on thread '" << threadp->mName <<
- "' reentering run(). Error what is: '" << e.what() << "'" << LL_ENDL;
- //output possible call stacks to log file.
- LLError::LLCallStacks::print();
-
- LOG_UNHANDLED_EXCEPTION("LLThread");
- continue;
- }
- break;
-
- } while (true);
+ threadp->run();
+ }
+ catch (const LLContinueError &e)
+ {
+ LL_WARNS("THREAD") << "ContinueException on thread '" << threadp->mName <<
+ "' reentering run(). Error what is: '" << e.what() << "'" << LL_ENDL;
+ //output possible call stacks to log file.
+ LLError::LLCallStacks::print();
- //LL_INFOS() << "LLThread::staticRun() Exiting: " << threadp->mName << LL_ENDL;
+ LOG_UNHANDLED_EXCEPTION("LLThread");
+ continue;
+ }
+ break;
- // We're done with the run function, this thread is done executing now.
- //NB: we are using this flag to sync across threads...we really need memory barriers here
- threadp->mStatus = STOPPED;
- }
- catch (std::bad_alloc)
- {
- threadp->mStatus = CRASHED;
- LLMemory::logMemoryInfo(TRUE);
+ } while (true);
- //output possible call stacks to log file.
- LLError::LLCallStacks::print();
+ //LL_INFOS() << "LLThread::staticRun() Exiting: " << threadp->mName << LL_ENDL;
- LL_ERRS("THREAD") << "Bad memory allocation in LLThread::staticRun() named '" << threadp->mName << "'!" << LL_ENDL;
- }
- catch (...)
- {
- threadp->mStatus = CRASHED;
- CRASH_ON_UNHANDLED_EXCEPTION("LLThread");
- }
+ // We're done with the run function, this thread is done executing now.
+ //NB: we are using this flag to sync across threads...we really need memory barriers here
+ threadp->mStatus = STOPPED;
delete threadp->mRecorder;
threadp->mRecorder = NULL;