xrpld
Loading...
Searching...
No Matches
xrpl::Workers_test::TestCallback Struct Reference
Inheritance diagram for xrpl::Workers_test::TestCallback:
Collaboration diagram for xrpl::Workers_test::TestCallback:

Public Member Functions

void processTask (int instance) override
 Perform a task.

Public Attributes

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

Detailed Description

Definition at line 87 of file Workers_test.cpp.

Member Function Documentation

◆ processTask()

void xrpl::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 xrpl::Workers::Callback.

Definition at line 90 of file Workers_test.cpp.

Member Data Documentation

◆ cv

std::condition_variable xrpl::Workers_test::TestCallback::cv

Definition at line 97 of file Workers_test.cpp.

◆ mut

std::mutex xrpl::Workers_test::TestCallback::mut

Definition at line 98 of file Workers_test.cpp.

◆ count

int xrpl::Workers_test::TestCallback::count = 0

Definition at line 99 of file Workers_test.cpp.