59 actor(ActorStartRoutine routine);
100 bool stop(
bool block =
false);
void start_routine(socket *child, ActorStartRoutine routine)
Call a user defined function and performs cleanup once it returns.
Definition: actor.cpp:102
bool stopped_
Keeps track of the status of the actor thread.
Definition: actor.hpp:142
C++ wrapper around zmq.
Definition: actor.cpp:29
The socket class represents the zmq sockets.
Definition: socket.hpp:75
bool stop(bool block=false)
Sends signal::stop to the actor thread.
Definition: actor.cpp:79
bool retval_
Definition: actor.hpp:144
actor(ActorStartRoutine routine)
Create a new actor.
Definition: actor.cpp:32
socket * child_pipe_
The child end of the pipe.
Definition: actor.hpp:131
static context actor_pipe_ctx_
This static, per process zmqpp::context, is used to connect PAIR socket between Actor and their paren...
Definition: actor.hpp:137
socket * parent_pipe_
The parent thread socket.
Definition: actor.hpp:125
actor & operator=(actor &&o)
Move-assignment operator.
Definition: actor.cpp:63
std::string bind_parent()
Bind the parent socket and return the endpoint used.
Definition: actor.cpp:121
socket * pipe()
Definition: actor.cpp:111
std::function< bool(socket *pipe) > ActorStartRoutine
The user defined function type.
Definition: actor.hpp:49
The context class represents internal zmq context and io threads.
Definition: context.hpp:46
An actor is a thread with a pair socket connected to its parent.
Definition: actor.hpp:43
virtual ~actor()
Definition: actor.cpp:73