diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2015-07-10 16:54:05 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2015-07-10 16:54:05 -0400 |
commit | 9809f59fa93952d066e61223b4c6d1895a43e4dd (patch) | |
tree | cb1747a38870c85687842ee4348a81ec74309874 /indra/llcommon/llcoros.h | |
parent | 675b6a807435a2c36297285dc307014141dd7960 (diff) | |
parent | 6f9f89ee71751a0e88bbda91fef1a575a5a68ed9 (diff) |
Merge restore of selfless changes
Diffstat (limited to 'indra/llcommon/llcoros.h')
-rwxr-xr-x | indra/llcommon/llcoros.h | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/indra/llcommon/llcoros.h b/indra/llcommon/llcoros.h index 01ee11da1a..ef1efd36e9 100755 --- a/indra/llcommon/llcoros.h +++ b/indra/llcommon/llcoros.h @@ -145,13 +145,6 @@ public: */ template <typename COROUTINE_SELF> std::string getName(const COROUTINE_SELF& self) const - { - return getNameByID(self.get_id()); - } - - /// getName() by self.get_id() - std::string getNameByID(const void* self_id) const; - /// for delayed initialization void setStackSize(S32 stacksize); @@ -167,4 +160,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) */ |