Documentation Home >> Headers >> <jss/actor.hpp> Header >> jss::actor class

The jss::actor class manages an actor. Each running actor is managed by one instance of jss::actor, though ownership can be transferred between instances as jss::actor is Movable.

namespace jss
{
    class actor
    {
    public:
        actor();
        template<typename Func,typename ... Args>
        explicit actor(Func&& f,Args&& ... args);
        ~actor();

        actor(actor&& other);
        actor& operator=(actor&& other);

        actor(const actor&) = delete;
        actor& operator=(const actor&) = delete;

        static actor_ref self();

        template<typename Msg>
        void send(Msg&& msg);

        void stop();

        static see description receive();
    };

    template<typename Msg>
    actor& operator<<(actor&,Msg&& msg);
}
Header

#include <jss/actor.hpp>

See Also