The implementation of active object pattern, simply put it sequentially executes posted callable objects in a single background thread. More...
#include <ActiveObject.h>
Public Types | |
typedef std::function< void()> | Call |
A callable object type, in fact wrapping std::function. | |
Public Member Functions | |
ActiveObject () | |
Constructor, the background thread is started after finishing this call. | |
~ActiveObject () | |
Destructor, it waits for finishing of all already posted calls. | |
void | Post (const Call &call) |
Adds the call , which should be executed in the worker thread to the end of the internally held list. More... | |
void | Post (Call &&call) |
The implementation of active object pattern, simply put it sequentially executes posted callable objects in a single background thread.
In the destructor it waits for the finishing of all already posted calls.
void AdblockPlus::ActiveObject::Post | ( | const Call & | call | ) |
Adds the call
, which should be executed in the worker thread to the end of the internally held list.
call | object. |