summaryrefslogtreecommitdiff
path: root/indra/llcommon/llcoros.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon/llcoros.cpp')
-rw-r--r--indra/llcommon/llcoros.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/llcommon/llcoros.cpp b/indra/llcommon/llcoros.cpp
index 8612f9353f..23b30bcc57 100644
--- a/indra/llcommon/llcoros.cpp
+++ b/indra/llcommon/llcoros.cpp
@@ -61,6 +61,23 @@
#include <excpt.h>
#endif
+// static
+bool LLCoros::on_main_coro()
+{
+ if (!LLCoros::instanceExists() || LLCoros::getName().empty())
+ {
+ return true;
+ }
+
+ return false;
+}
+
+// static
+bool LLCoros::on_main_thread_main_coro()
+{
+ return on_main_coro() && on_main_thread();
+}
+
// static
LLCoros::CoroData& LLCoros::get_CoroData(const std::string& caller)
{