2a60fdd9df
This ensures that the Lockvoker object we access from currOwner remains valid past the lifetime of the Lockvoker object that gets copied and invoked by boost::asio
29 lines
757 B
C++
29 lines
757 B
C++
#ifndef ASYNCHRONOUS_CONTINUATION_CHAIN_LINK_H
|
|
#define ASYNCHRONOUS_CONTINUATION_CHAIN_LINK_H
|
|
|
|
#include <memory>
|
|
|
|
namespace smo {
|
|
|
|
/**
|
|
* @brief Base class for all asynchronous continuation chain links
|
|
*
|
|
* This non-template base class provides type erasure for the continuation
|
|
* chain, allowing RTTI and dynamic casting when walking the chain.
|
|
*
|
|
* The chain walking logic can use dynamic_cast to determine the most
|
|
* derived type and perform appropriate operations.
|
|
*/
|
|
class AsynchronousContinuationChainLink
|
|
{
|
|
public:
|
|
virtual ~AsynchronousContinuationChainLink() = default;
|
|
|
|
virtual std::shared_ptr<AsynchronousContinuationChainLink>
|
|
getCallersContinuationShPtr() = 0;
|
|
};
|
|
|
|
} // namespace smo
|
|
|
|
#endif // ASYNCHRONOUS_CONTINUATION_CHAIN_LINK_H
|