8 #include <boost/bind/bind.hpp>
12 using namespace boost::placeholders;
22 : manager_(manager), refcount_(0), shutdown_invoked_(false),
23 delete_paused_(false),
25 delete_time_stamp_usecs_(0) {
42 std::scoped_lock lock(
mutex_);
62 std::scoped_lock lock(
mutex_);
105 std::scoped_lock lock(
mutex_);
117 std::scoped_lock lock(
mutex_);
131 std::scoped_lock lock(
mutex_);
145 std::scoped_lock lock(
mutex_);
157 std::scoped_lock lock(
mutex_);
162 std::scoped_lock lock(
mutex_);
172 queue_.set_name(
"LifetimeManager");
183 queue_.set_disable(disabled);
194 actor_ref.
actor = actor;
195 queue_.Enqueue(actor_ref);
200 actor_ref.
actor = actor;
201 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()