3#include <boost/smart_ptr/intrusive_ptr.hpp>
7namespace engine::impl {
11class TaskContextHolder
final {
13 TaskContextHolder()
noexcept =
default;
15 explicit TaskContextHolder(
16 boost::intrusive_ptr<TaskContext>&& context)
noexcept;
18 static TaskContextHolder Adopt(TaskContext& context)
noexcept;
20 TaskContextHolder(TaskContextHolder&&)
noexcept =
default;
21 TaskContextHolder& operator=(TaskContextHolder&&) =
delete;
24 boost::intrusive_ptr<TaskContext>&& Extract() &&
noexcept;
27 boost::intrusive_ptr<TaskContext> context_;