summaryrefslogtreecommitdiff
path: root/indra/llcommon/llcoros.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2015-07-02 17:00:32 -0400
committerNat Goodspeed <nat@lindenlab.com>2015-07-02 17:00:32 -0400
commitf90023fc0b3b61fd346a2b56e30e5f3c35814192 (patch)
tree3c020043d54ef45a6f8f1e9c638ab19dcd590ae0 /indra/llcommon/llcoros.h
parent2a29dbc48295ad24a8a7137a10b9d891debea978 (diff)
MAINT-5357: Introduce and populate llcoro:: namespace.
To date, the coroutine helper functions in lleventcoro.h have been in the global namespace. Migrate them into llcoro namespace, and fix references. Specifically, LLVoidListener => llcoro::VoidListener, and voidlistener(), postAndWait(), both waitForEventOn(), postAndWait2(), errorException() and errorLog() have been moved into llcoro. Also migrate new LLCoros::get_self() and Suspending to llcoro:: namespace. While at it, I realized that -- having converted several lleventcoro.h functions from templates (for arbitrary 'self' parameter type) to ordinary functions, having moved them from lleventcoro.h to lleventcoro.cpp, we can now migrate their helpers from lleventcoro.h to lleventcoro.cpp as well. This eliminates the need for the LLEventDetail namespace; the relevant helpers are now in an anonymous namespace in the .cpp file: listenerNameForCoro(), storeToLLSDPath(), WaitForEventOnHelper and wfeoh().
Diffstat (limited to 'indra/llcommon/llcoros.h')
-rwxr-xr-xindra/llcommon/llcoros.h35
1 files changed, 20 insertions, 15 deletions
diff --git a/indra/llcommon/llcoros.h b/indra/llcommon/llcoros.h
index 3f58a17aa9..e478600f00 100755
--- a/indra/llcommon/llcoros.h
+++ b/indra/llcommon/llcoros.h
@@ -137,21 +137,6 @@ public:
*/
std::string getName() const;
- /// get the current coro::self& for those who really really care
- static coro::self& get_self();
-
- /// Instantiate one of these in a block surrounding any leaf point when
- /// control literally switches away from this coroutine.
- class Suspending
- {
- public:
- Suspending();
- ~Suspending();
-
- private:
- coro::self* mSuspended;
- };
-
/// for delayed initialization
void setStackSize(S32 stacksize);
@@ -166,4 +151,24 @@ private:
CoroMap mCoros;
};
+namespace llcoro
+{
+
+/// get the current coro::self& for those who really really care
+LLCoros::coro::self& get_self();
+
+/// Instantiate one of these in a block surrounding any leaf point when
+/// control literally switches away from this coroutine.
+class Suspending
+{
+public:
+ Suspending();
+ ~Suspending();
+
+private:
+ LLCoros::coro::self* mSuspended;
+};
+
+} // namespace llcoro
+
#endif /* ! defined(LL_LLCOROS_H) */