[#util-TaskRunnerInterface]
= xref:util.adoc[util]::TaskRunnerInterface
:relfileprefix: ../
:mrdocs:

This header provides an interface and simple implementation for a task runner&period; Another threaded, serial implementation using a queue is available in the scheduler module&apos;s SerialTaskRunner&period;

== Synopsis

Declared in `&lt;util&sol;task&lowbar;runner&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class TaskRunnerInterface;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:util/TaskRunnerInterface/2destructor.adoc[`&#126;TaskRunnerInterface`] [.small]#[destructor]# [.small]#[virtual]#
| Destroys the task runner interface&period;
| xref:util/TaskRunnerInterface/flush.adoc[`flush`]  [.small]#[virtual]#
| Forces the processing of all pending events&period;
| xref:util/TaskRunnerInterface/insert.adoc[`insert`]  [.small]#[virtual]#
| The callback can either be queued for later&sol;asynchronous&sol;threaded processing, or be executed immediately for synchronous processing&period;
| xref:util/TaskRunnerInterface/size.adoc[`size`]  [.small]#[virtual]#
| Returns the number of currently pending events&period;
|===


== Derived Classes

[cols="1,4"]
|===
| Name| Description
| xref:util/ImmediateTaskRunner.adoc[`ImmediateTaskRunner`] 
| Task runner that processes each callback synchronously on insertion&period;
| xref:SerialTaskRunner.adoc[`SerialTaskRunner`] 
| Class used by CScheduler clients which may schedule multiple jobs which are required to be run serially&period; Jobs may not be run on the same thread, but no two jobs will be executed at the same time and memory will be release&hyphen;acquire consistent (the scheduler will internally do an acquire before invoking a callback as well as a release at the end)&period; In practice this means that a callback B() will be able to observe all of the effects of callback A() which executed before it&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
