Asnc: LockSet is now a member of serializedAsyncCont; not base class
We needed to pass in a ref to the parent SerializedAsyncContin, so we had to make it a member var instead of a base class.
This commit is contained in:
@@ -106,7 +106,7 @@ public:
|
||||
|
||||
template <class OriginalCbFnT>
|
||||
class SerializedAsynchronousContinuation
|
||||
: public PostedAsynchronousContinuation<OriginalCbFnT>, public LockSet
|
||||
: public PostedAsynchronousContinuation<OriginalCbFnT>
|
||||
{
|
||||
public:
|
||||
SerializedAsynchronousContinuation(
|
||||
@@ -114,16 +114,19 @@ public:
|
||||
OriginalCbFnT originalCbFn,
|
||||
std::vector<std::reference_wrapper<SpinLock>> requiredLocks = {})
|
||||
: PostedAsynchronousContinuation<OriginalCbFnT>(caller, originalCbFn),
|
||||
LockSet(std::move(requiredLocks))
|
||||
requiredLocks(*this, std::move(requiredLocks))
|
||||
{}
|
||||
|
||||
template<typename... Args>
|
||||
void callOriginalCb(Args&&... args)
|
||||
{
|
||||
LockSet::release();
|
||||
requiredLocks.release();
|
||||
PostedAsynchronousContinuation<OriginalCbFnT>::callOriginalCb(
|
||||
std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
public:
|
||||
LockSet<OriginalCbFnT> requiredLocks;
|
||||
};
|
||||
|
||||
} // namespace smo
|
||||
|
||||
Reference in New Issue
Block a user