[#ThreadPool-Stop]
= xref:ThreadPool.adoc[ThreadPool]::Stop
:relfileprefix: ../
:mrdocs:

Stop all worker threads and wait for them to exit&period;

== Synopsis

Declared in `&lt;util&sol;threadpool&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f951f99b2a8)&rsqb;&rsqb;
void
Stop();
----

== Description

Sets the interrupt flag, wakes all waiting workers, and joins them&period; Any remaining tasks in the queue will be processed before returning&period;

Must be called from a controller (non&hyphen;worker) thread&period; Concurrent calls to Start() will be rejected while Stop() is in progress&period;


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