diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-08-28 20:47:43 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-08-28 20:47:43 -0400 |
commit | cde1174345224d33d6b45b1e3243fa39043223e5 (patch) | |
tree | 6c8db6e0499622d8c7206a11c997eb173ebd478f /indra/llcommon/llcoros.h | |
parent | 6f454ad8366ed33bbe199c3fc3ed69e6d3448cec (diff) | |
parent | 35efadf78315f9b351415930dca4fae251ef4dd0 (diff) |
Merge branch 'main' into release/luau-scripting.
Diffstat (limited to 'indra/llcommon/llcoros.h')
-rw-r--r-- | indra/llcommon/llcoros.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/llcommon/llcoros.h b/indra/llcommon/llcoros.h index 61c0fef1c3..7491a4123a 100644 --- a/indra/llcommon/llcoros.h +++ b/indra/llcommon/llcoros.h @@ -95,6 +95,16 @@ class LL_COMMON_API LLCoros: public LLSingleton<LLCoros> void cleanupSingleton() override; public: + // For debugging, return true if on the main coroutine for the current thread + // Code that should not be executed from a coroutine should be protected by + // llassert(LLCoros::on_main_coro()) + static bool on_main_coro(); + + // For debugging, return true if on the main thread and not in a coroutine + // Non-thread-safe code in the main loop should be protected by + // llassert(LLCoros::on_main_thread_main_coro()) + static bool on_main_thread_main_coro(); + /// The viewer's use of the term "coroutine" became deeply embedded before /// the industry term "fiber" emerged to distinguish userland threads from /// simpler, more transient kinds of coroutines. Semantically they've |