libadblockplus
 All Classes Namespaces Functions Variables Typedefs Enumerations Pages
Public Types | Public Member Functions | List of all members
AdblockPlus::ActiveObject Class Reference

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)
 

Detailed Description

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.

Member Function Documentation

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.

Parameters
callobject.

The documentation for this class was generated from the following file: