39 #ifndef LIBPMEMOBJ_CPP_POOL_DATA_HPP
40 #define LIBPMEMOBJ_CPP_POOL_DATA_HPP
59 set_cleanup(std::function<
void()> cleanup)
61 bool expected =
false;
65 if (initialized.compare_exchange_strong(
66 expected,
true, std::memory_order_release,
67 std::memory_order_relaxed)) {
68 this->cleanup = cleanup;
72 std::atomic<bool> initialized;
73 std::function<void()> cleanup;