summaryrefslogtreecommitdiff
path: root/indra/llcommon/llcoros.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <andreylproductengine@lindenlab.com>2018-06-11 14:28:30 +0300
committerAndrey Lihatskiy <andreylproductengine@lindenlab.com>2018-06-11 14:28:30 +0300
commit1b236217560aeb81d5eea5a6b67b1f9896b005a8 (patch)
treeb69705b8ef9831b4725fa3023626d87ec4b1809a /indra/llcommon/llcoros.cpp
parent546fc96f01298fe16f1cb0454e65569c77c44090 (diff)
parent2761c1c7c2fdb6cbfe610be7e2f4f8753271d36f (diff)
Merged lindenlab/viewer-neko into default
Diffstat (limited to 'indra/llcommon/llcoros.cpp')
-rw-r--r--indra/llcommon/llcoros.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/indra/llcommon/llcoros.cpp b/indra/llcommon/llcoros.cpp
index c5ba23f68c..4bab669046 100644
--- a/indra/llcommon/llcoros.cpp
+++ b/indra/llcommon/llcoros.cpp
@@ -35,6 +35,7 @@
// external library headers
#include <boost/bind.hpp>
// other Linden headers
+#include "lltimer.h"
#include "llevents.h"
#include "llerror.h"
#include "stringize.h"
@@ -280,6 +281,21 @@ void LLCoros::setStackSize(S32 stacksize)
mStackSize = stacksize;
}
+void LLCoros::printActiveCoroutines()
+{
+ LL_INFOS("LLCoros") << "-------------- List of active coroutines ------------";
+ CoroMap::iterator iter;
+ CoroMap::iterator end = mCoros.end();
+ F64 time = LLTimer::getTotalSeconds();
+ for (iter = mCoros.begin(); iter != end; iter++)
+ {
+ F64 life_time = time - iter->second->mCreationTime;
+ LL_CONT << LL_NEWLINE << "Name: " << iter->first << " life: " << life_time;
+ }
+ LL_CONT << LL_ENDL;
+ LL_INFOS("LLCoros") << "-----------------------------------------------------" << LL_ENDL;
+}
+
#if LL_WINDOWS
static const U32 STATUS_MSC_EXCEPTION = 0xE06D7363; // compiler specific
@@ -375,7 +391,8 @@ LLCoros::CoroData::CoroData(CoroData* prev, const std::string& name,
mCoro(boost::bind(toplevel, _1, this, callable), stacksize),
// don't consume events unless specifically directed
mConsuming(false),
- mSelf(0)
+ mSelf(0),
+ mCreationTime(LLTimer::getTotalSeconds())
{
}