[#CCheckQueue]
= CCheckQueue
:mrdocs:

Queue for verifications that have to be performed&period; The verifications are represented by a type T, which must provide an operator(), returning an std&colon;&colon;optional&lt;R&gt;&period;

== Synopsis

Declared in `&lt;checkqueue&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename T,
    typename R = std::remove&lowbar;cvref&lowbar;t&lt;decltype(std&colon;&colon;declval&lt;T&gt;()()&period;value())&gt;&gt;
class CCheckQueue;
----

== Description

The overall result of the computation is std&colon;&colon;nullopt if all invocations return std&colon;&colon;nullopt, or one of the other results otherwise&period;

One thread (the master) is assumed to push batches of verifications onto the queue, where they are processed by N&hyphen;1 worker threads&period; When the master is done adding work, it temporarily joins the worker pool as an N&apos;th worker, until all jobs are done&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:CCheckQueue/2constructor-07.adoc[`CCheckQueue`]         [.small]#[constructor]#
| Constructors
| xref:CCheckQueue/2destructor.adoc[`&#126;CCheckQueue`] [.small]#[destructor]#
| Stops all worker threads and joins them before destruction&period;
| xref:CCheckQueue/operator_assign-02.adoc[`operator&equals;`] 
| Assignment operators
| xref:CCheckQueue/Add.adoc[`Add`] 
| Add a batch of checks to the queue
| xref:CCheckQueue/Complete.adoc[`Complete`] 
| Join the execution until completion&period; If at least one evaluation wasn&apos;t successful, return its error&period;
| xref:CCheckQueue/HasThreads.adoc[`HasThreads`] 
| Returns true if the queue has any worker threads&period;
|===


== Data Members

[cols="1,4"]
|===
| Name| Description
| xref:CCheckQueue/m_control_mutex.adoc[`m&lowbar;control&lowbar;mutex`] 
| Mutex to ensure only one concurrent CCheckQueueControl
|===



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