#ifndef SPINSCALE_CALLBACK_H #define SPINSCALE_CALLBACK_H #include namespace sscl { // Forward declaration class AsynchronousContinuationChainLink; /** * @brief Callback class that wraps a function and its caller continuation * * This class provides a way to pass both a callback function and the * caller's continuation in a single object, enabling deadlock detection * by walking the chain of continuations. * * Usage: Callback{context, std::bind(...)} */ template class Callback { public: // Aggregate initialization allows: Callback{context, std::bind(...)} std::shared_ptr callerContinuation; CbFnT callbackFn; }; } // namespace sscl #endif // SPINSCALE_CALLBACK_H