7 #include <boost/bind/bind.hpp>
11 using namespace boost::placeholders;
21 : manager_(manager), refcount_(0), shutdown_invoked_(false),
22 delete_paused_(false),
24 delete_time_stamp_usecs_(0) {
41 std::scoped_lock lock(
mutex_);
61 std::scoped_lock lock(
mutex_);
104 std::scoped_lock lock(
mutex_);
116 std::scoped_lock lock(
mutex_);
130 std::scoped_lock lock(
mutex_);
144 std::scoped_lock lock(
mutex_);
156 std::scoped_lock lock(
mutex_);
161 std::scoped_lock lock(
mutex_);
171 queue_.set_name(
"LifetimeManager");
182 queue_.set_disable(disabled);
193 actor_ref.
actor = actor;
194 queue_.Enqueue(actor_ref);
199 actor_ref.
actor = actor;
200 queue_.Enqueue(actor_ref);
void Add(DependencyRef< NodeType, ObjectType > *node)
void Remove(DependencyRef< NodeType, ObjectType > *node)
IteratorBase< LifetimeRefBase, typename List::iterator > iterator
LifetimeManager * manager_
virtual bool MayDelete() const =0
void DependencyAdd(DependencyRef< LifetimeRefBase, LifetimeActor > *node)
bool ReferenceDecrementAndTest()
void ReferenceIncrement()
void set_shutdown_invoked()
LifetimeActor(LifetimeManager *manager)
virtual void DeleteComplete()
std::atomic< bool > deleted_
void DependencyRemove(DependencyRef< LifetimeRefBase, LifetimeActor > *node)
uint64_t delete_time_stamp_usecs_
void EnqueueNoIncrement(LifetimeActor *actor)
virtual void SetQueueDisable(bool disabled)
virtual ~LifetimeManager()
WorkQueue< LifetimeActorRef > queue_
virtual bool MayDestroy()
LifetimeManager(int task_id)
bool DeleteExecutor(LifetimeActorRef actor_ref)
void Enqueue(LifetimeActor *actor)
LifetimeRefBase(LifetimeActor *actor)
virtual ~LifetimeRefBase()
static uint64_t UTCTimestampUsec()