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 Args
N
temp
N(std::forward<Args
N>(args
N))
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>