diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2020-05-14 14:51:52 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2020-05-14 14:51:52 -0400 |
commit | 98dfba0d2f24aeb92e023df9d48b23fef8253024 (patch) | |
tree | 9e7ebaf52c4bf16b361e2ec440bfac612e2be699 /indra/llcommon/llthreadsafequeue.h | |
parent | a83da3a4525bf855c6c68c34dfbc8d93941d6174 (diff) |
DRTVWR-476: Wrap boost::fibers::mutex et al. with LLCoros aliases.
Specifically:
LLCoros::Mutex means boost::fibers::mutex
LLCoros::LockType means std::unique_lock<boost::fibers::mutex>
LLCoros::ConditionVariable means boost::fibers::condition_variable
LLCoros::cv_status means boost::fibers::cv_status
So as not to drag in all of boost::fibers::mutex.hpp or condition_variable.hpp
for each consumer of llcoros.h, instead #define LLCOROS_MUTEX_HEADER and
LLCOROS_CONDVAR_HEADER. Those who need them can #include the relevant macro.
Update llcond.h and llthreadsafequeue.h accordingly.
Diffstat (limited to 'indra/llcommon/llthreadsafequeue.h')
-rw-r--r-- | indra/llcommon/llthreadsafequeue.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/indra/llcommon/llthreadsafequeue.h b/indra/llcommon/llthreadsafequeue.h index bac536f7ee..8f5e0f3bf3 100644 --- a/indra/llcommon/llthreadsafequeue.h +++ b/indra/llcommon/llthreadsafequeue.h @@ -31,7 +31,8 @@ #include <deque> #include <string> #include "mutex.h" -#include <boost/fiber/condition_variable.hpp> +#include "llcoros.h" +#include LLCOROS_CONDVAR_HEADER // // A general queue exception. @@ -119,10 +120,10 @@ private: U32 mCapacity; bool mClosed; - boost::fibers::mutex mLock; - typedef std::unique_lock<decltype(mLock)> lock_t; - boost::fibers::condition_variable mCapacityCond; - boost::fibers::condition_variable mEmptyCond; + LLCoros::Mutex mLock; + typedef LLCoros::LockType lock_t; + LLCoros::ConditionVariable mCapacityCond; + LLCoros::ConditionVariable mEmptyCond; }; // LLThreadSafeQueue |