7namespace di::sync::detail {
8class InPlaceStopCallbackBase :
public container::IntrusiveListNode<> {
10 friend class ::di::sync::InPlaceStopSource;
12 using ErasedCallback = void (*)(
void*);
15 explicit InPlaceStopCallbackBase(InPlaceStopSource
const* parent, ErasedCallback execute)
16 : m_parent(parent), m_execute(execute) {}
18 InPlaceStopSource
const* m_parent {
nullptr };
19 ErasedCallback m_execute {
nullptr };
20 Atomic<bool> m_already_executed {
false };
21 Atomic<bool*> m_did_destruct_in_same_thread {
nullptr };
24 void execute() { m_execute(
this); }