Home
Base module

Runner::Context

Context object which we send to the thread context.

Context

#include <icy/runner.h>
struct Context

Defined in src/base/include/icy/runner.h:87

Context object which we send to the thread context.

This intermediate object allows us to garecefully handle late invokebacks and so avoid the need for deferred destruction of [Runner](icy-Runner.html#runner) objects.

List of all members

NameKindOwner
tidvariableDeclared here
runningvariableDeclared here
cancelledvariableDeclared here
repeatingvariableDeclared here
resetfunctionDeclared here
ContextfunctionDeclared here

Public Attributes

ReturnNameDescription
std::thread::idtid
std::atomic< bool >running
std::atomic< bool >cancelled
boolrepeating

tid

std::thread::id tid

Defined in src/base/include/icy/runner.h:89


running

std::atomic< bool > running

Defined in src/base/include/icy/runner.h:90


cancelled

std::atomic< bool > cancelled

Defined in src/base/include/icy/runner.h:91


repeating

bool repeating = false

Defined in src/base/include/icy/runner.h:92

Public Methods

ReturnNameDescription
voidreset inlineResets the context to its initial state so it can be reused. The implementation must call this before restarting a [Runner](icy-Runner.html#runner).
Context inlineDefault constructor; calls [reset()](#reset-6) to initialize fields.

reset

inline

inline void reset()

Defined in src/base/include/icy/runner.h:96

Resets the context to its initial state so it can be reused. The implementation must call this before restarting a [Runner](icy-Runner.html#runner).


Context

inline

inline Context()

Defined in src/base/include/icy/runner.h:103

Default constructor; calls [reset()](#reset-6) to initialize fields.