Rename: LockSpec=>LockSet
This commit is contained in:
@@ -106,7 +106,7 @@ public:
|
||||
|
||||
template <class OriginalCbFnT>
|
||||
class SerializedAsynchronousContinuation
|
||||
: public PostedAsynchronousContinuation<OriginalCbFnT>, public LockSpec
|
||||
: public PostedAsynchronousContinuation<OriginalCbFnT>, public LockSet
|
||||
{
|
||||
public:
|
||||
SerializedAsynchronousContinuation(
|
||||
@@ -114,13 +114,13 @@ public:
|
||||
OriginalCbFnT originalCbFn,
|
||||
std::vector<std::reference_wrapper<SpinLock>> requiredLocks = {})
|
||||
: PostedAsynchronousContinuation<OriginalCbFnT>(caller, originalCbFn),
|
||||
LockSpec(std::move(requiredLocks))
|
||||
LockSet(std::move(requiredLocks))
|
||||
{}
|
||||
|
||||
template<typename... Args>
|
||||
void callOriginalCb(Args&&... args)
|
||||
{
|
||||
LockSpec::release();
|
||||
LockSet::release();
|
||||
PostedAsynchronousContinuation<OriginalCbFnT>::callOriginalCb(
|
||||
std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
+5
-5
@@ -10,16 +10,16 @@
|
||||
namespace smo {
|
||||
|
||||
/**
|
||||
* @brief LockSpec - Manages a collection of locks for acquisition/release
|
||||
* @brief LockSet - Manages a collection of locks for acquisition/release
|
||||
*/
|
||||
class LockSpec
|
||||
class LockSet
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @brief Constructor
|
||||
* @param requiredLocks Vector of lock references that must be acquired
|
||||
*/
|
||||
LockSpec(std::vector<std::reference_wrapper<SpinLock>> requiredLocks = {})
|
||||
LockSet(std::vector<std::reference_wrapper<SpinLock>> requiredLocks = {})
|
||||
: requiredLocks(std::move(requiredLocks)), allLocksAcquired(false)
|
||||
{}
|
||||
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
{
|
||||
throw std::runtime_error(
|
||||
std::string(__func__) +
|
||||
": LockSpec::tryAcquire() called but allLocksAcquired is "
|
||||
": LockSet::tryAcquire() called but allLocksAcquired is "
|
||||
"already true");
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
{
|
||||
throw std::runtime_error(
|
||||
std::string(__func__) +
|
||||
": LockSpec::release() called but allLocksAcquired is false");
|
||||
": LockSet::release() called but allLocksAcquired is false");
|
||||
}
|
||||
|
||||
for (auto& lockRef : requiredLocks) {
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ public:
|
||||
/**
|
||||
* @brief Constructor that immediately posts to io_service
|
||||
* @param serializedContinuation Reference to the serialized continuation
|
||||
* containing LockSpec and target io_service
|
||||
* containing LockSet and target io_service
|
||||
* @param invocationTarget The std::bind result to invoke when locks are acquired
|
||||
*/
|
||||
LockerAndInvoker(
|
||||
|
||||
Reference in New Issue
Block a user