Documentation Home >> Headers >> <jss/actor.hpp> Header >> jss::actor >> jss::actor constructor for starting an actor

Construct a new jss::actor instance running the specified function.

template<typename Func,typename ... Args>
explicit actor(Func&& f,Args&& ... args);


Constructs a jss::actor instance running a copy of the specified function on a new thread, with copies of the specified args. The copies are contructed as-if Func temp(std::forward<Func>(f)) and ArgsN tempN(std::forward<ArgsN>(argsN)) for each element in Args....


std::system_error if the actor thread cannot be started; any exceptions thrown by the copy or move constructor of Func.


this->valid() returns true.


#include <jss/actor.hpp>

See Also