117 bool stop(
bool block =
false);
std::mutex mutex_
Definition: actor.hpp:158
void start_routine(socket *child, ActorStartRoutine routine)
Call a user defined function and performs cleanup once it returns.
Definition: actor.cpp:118
bool stopped_
Keeps track of the status of the actor thread.
Definition: actor.hpp:165
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:94
std::exception_ptr eptr_
Definition: actor.hpp:160
bool retval_
Definition: actor.hpp:167
actor(ActorStartRoutine routine)
Create a new actor.
Definition: actor.cpp:32
socket * child_pipe_
The child end of the pipe.
Definition: actor.hpp:150
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:156
socket * parent_pipe_
The parent thread socket.
Definition: actor.hpp:144
actor & operator=(actor &&o)
Move-assignment operator.
Definition: actor.cpp:78
std::string bind_parent()
Bind the parent socket and return the endpoint used.
Definition: actor.cpp:148
socket * pipe()
Definition: actor.cpp:138
The context class represents internal zmq context and io threads.
Definition: context.hpp:46
std::function< bool(socket *pipe)> ActorStartRoutine
The user defined function type.
Definition: actor.hpp:58
An actor is a thread with a pair socket connected to its parent.
Definition: actor.hpp:52
virtual ~actor()
Definition: actor.cpp:88