59 Active() : done{
false}, mq{}, thread{[=]{
flag_type done
The flag determining whether or not we should execute more tasks.
Global namespace of the SCL.
receiver_type & receiver()
Get a receiver for this channel.
void execute(message_type msg)
Execute a task via the active object.
value_type receive()
Alias for ChannelReceiver::receive.
ChannelSender & send(U &&value)
Alias for ChannelSender::push.
message_queue_type mq
The queue used to transfer messages.
Active()
Construct an active object (starts spinning the queue)
A class that allow task execution on a separate thread using RAII semantics.
thread_type thread
The worker thread used to execute tasks.
std::thread thread_type
The type of threads used to execute the tasks.
~Active()
Destroy an active object (finishing the queue)
sender_type & sender()
Get a sender for this channel.
std::function< void()> message_type
The type of messages sent through the queue.
std::atomic_bool flag_type
The type of flags used for completion checks.