summaryrefslogtreecommitdiff
path: root/indra/llcommon/llcoros.h
diff options
context:
space:
mode:
authorBrad Linden <brad@lindenlab.com>2024-08-09 17:57:23 -0700
committerBrad Linden <brad@lindenlab.com>2024-08-09 17:57:23 -0700
commita7fde9d79c517bfc6165756c1bc3eb16fa4d935c (patch)
treef0608f7f72f23a447778f8bce6f210eb221ebdf1 /indra/llcommon/llcoros.h
parentac330f63fd7ac655bbd06ce5d4ed65430aa2f42a (diff)
parentc106221726c48a4231b7854bff224ae422c0517f (diff)
Merge remote-tracking branch release/2024.06-atlasaurus into 'develop'
Diffstat (limited to 'indra/llcommon/llcoros.h')
-rw-r--r--indra/llcommon/llcoros.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/llcommon/llcoros.h b/indra/llcommon/llcoros.h
index 369d65407e..c3820ae987 100644
--- a/indra/llcommon/llcoros.h
+++ b/indra/llcommon/llcoros.h
@@ -31,8 +31,9 @@
#include "llexception.h"
#include <boost/fiber/fss.hpp>
-#include <boost/fiber/future/promise.hpp>
#include <boost/fiber/future/future.hpp>
+#include <boost/fiber/future/promise.hpp>
+#include <boost/fiber/recursive_mutex.hpp>
#include "mutex.h"
#include "llsingleton.h"
#include "llinstancetracker.h"
@@ -307,6 +308,12 @@ public:
// use mutex, lock, condition_variable suitable for coroutines
using Mutex = boost::fibers::mutex;
+ using RMutex = boost::fibers::recursive_mutex;
+ // With C++17, LockType is deprecated: at this point we can directly
+ // declare 'std::unique_lock lk(some_mutex)' without explicitly stating
+ // the mutex type. Sadly, making LockType an alias template for
+ // std::unique_lock doesn't work the same way: Class Template Argument
+ // Deduction only works for class templates, not alias templates.
using LockType = std::unique_lock<Mutex>;
using cv_status = boost::fibers::cv_status;
using ConditionVariable = boost::fibers::condition_variable;