Template Class ActorThread
Defined in File actor.hpp
Inheritance Relationships
Base Types
public ActorTprivate actorpp::detail::IActorThread(Class IActorThread)
Class Documentation
-
template<typename ActorT>
class ActorThread : public ActorT, private actorpp::detail::IActorThread Wrapper around a class derived from Actor, which runs its
void run()method in a thread, and itsvoid exit()method in the destructor. For the thread to be cleaned up,exitmust causerunto return.This can’t be implemented nicely through regular inheritance, because the constructor of a base class can’t safely call derived methods, so we can’t start the thread from the constructor.