rippled
Public Member Functions | Public Attributes | List of all members
ripple::Workers_test::TestCallback Struct Reference
Inheritance diagram for ripple::Workers_test::TestCallback:
Inheritance graph
[legend]
Collaboration diagram for ripple::Workers_test::TestCallback:
Collaboration graph
[legend]

Public Member Functions

void processTask (int instance) override
 Perform a task. More...
 

Public Attributes

std::condition_variable cv
 
std::mutex mut
 
int count = 0
 

Detailed Description

Definition at line 107 of file Workers_test.cpp.

Member Function Documentation

◆ processTask()

void ripple::Workers_test::TestCallback::processTask ( int  instance)
overridevirtual

Perform a task.

The call is made on a thread owned by Workers. It is important that you only process one task from inside your callback. Each call to addTask will result in exactly one call to processTask.

Parameters
instanceThe worker thread instance.
See also
Workers::addTask

Implements ripple::Workers::Callback.

Definition at line 110 of file Workers_test.cpp.

Member Data Documentation

◆ cv

std::condition_variable ripple::Workers_test::TestCallback::cv

Definition at line 117 of file Workers_test.cpp.

◆ mut

std::mutex ripple::Workers_test::TestCallback::mut

Definition at line 118 of file Workers_test.cpp.

◆ count

int ripple::Workers_test::TestCallback::count = 0

Definition at line 119 of file Workers_test.cpp.