/usr/share/doc/libjuce/apiref/classThreadPoolJob.html is in libjuce-doc 4.3.0~repack-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.12"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>JUCE: ThreadPoolJob Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">JUCE
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.12 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> |
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-static-methods">Static Public Member Functions</a> |
<a href="classThreadPoolJob-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">ThreadPoolJob Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p>A task that is executed by a <a class="el" href="classThreadPool.html" title="A set of threads that will run a list of jobs. ">ThreadPool</a> object.
<a href="classThreadPoolJob.html#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a534c077f3c60168d88555ade062420b3"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="classThreadPoolJob.html#a534c077f3c60168d88555ade062420b3">JobStatus</a> { <a class="el" href="classThreadPoolJob.html#a534c077f3c60168d88555ade062420b3a390a063ef5f8b769a682f1daefc64e72">jobHasFinished</a> = 0,
<a class="el" href="classThreadPoolJob.html#a534c077f3c60168d88555ade062420b3a42789d58048631dd96008ce23911a545">jobNeedsRunningAgain</a>
}<tr class="memdesc:a534c077f3c60168d88555ade062420b3"><td class="mdescLeft"> </td><td class="mdescRight">These are the values that can be returned by the <a class="el" href="classThreadPoolJob.html#aec49c01680e563257c79088dc87bc0d9" title="Peforms the actual work that this job needs to do. ">runJob()</a> method. <a href="classThreadPoolJob.html#a534c077f3c60168d88555ade062420b3">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:a534c077f3c60168d88555ade062420b3"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a701138425809122d1271561fcfa1c20d"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classThreadPoolJob.html#a701138425809122d1271561fcfa1c20d">ThreadPoolJob</a> (const <a class="el" href="classString.html">String</a> &name)</td></tr>
<tr class="memdesc:a701138425809122d1271561fcfa1c20d"><td class="mdescLeft"> </td><td class="mdescRight">Creates a thread pool job object. <a href="#a701138425809122d1271561fcfa1c20d">More...</a><br /></td></tr>
<tr class="separator:a701138425809122d1271561fcfa1c20d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a519d648535cefc3aed07455dd5dd9e5b"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classThreadPoolJob.html#a519d648535cefc3aed07455dd5dd9e5b">~ThreadPoolJob</a> ()</td></tr>
<tr class="memdesc:a519d648535cefc3aed07455dd5dd9e5b"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#a519d648535cefc3aed07455dd5dd9e5b">More...</a><br /></td></tr>
<tr class="separator:a519d648535cefc3aed07455dd5dd9e5b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac38d4b20b57d6dbf46140709f573ea1f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classString.html">String</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classThreadPoolJob.html#ac38d4b20b57d6dbf46140709f573ea1f">getJobName</a> () const</td></tr>
<tr class="memdesc:ac38d4b20b57d6dbf46140709f573ea1f"><td class="mdescLeft"> </td><td class="mdescRight">Returns the name of this job. <a href="#ac38d4b20b57d6dbf46140709f573ea1f">More...</a><br /></td></tr>
<tr class="separator:ac38d4b20b57d6dbf46140709f573ea1f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0005910260394539b8117a858f5b4cfb"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classThreadPoolJob.html#a0005910260394539b8117a858f5b4cfb">setJobName</a> (const <a class="el" href="classString.html">String</a> &newName)</td></tr>
<tr class="memdesc:a0005910260394539b8117a858f5b4cfb"><td class="mdescLeft"> </td><td class="mdescRight">Changes the job's name. <a href="#a0005910260394539b8117a858f5b4cfb">More...</a><br /></td></tr>
<tr class="separator:a0005910260394539b8117a858f5b4cfb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aec49c01680e563257c79088dc87bc0d9"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classThreadPoolJob.html#a534c077f3c60168d88555ade062420b3">JobStatus</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classThreadPoolJob.html#aec49c01680e563257c79088dc87bc0d9">runJob</a> ()=0</td></tr>
<tr class="memdesc:aec49c01680e563257c79088dc87bc0d9"><td class="mdescLeft"> </td><td class="mdescRight">Peforms the actual work that this job needs to do. <a href="#aec49c01680e563257c79088dc87bc0d9">More...</a><br /></td></tr>
<tr class="separator:aec49c01680e563257c79088dc87bc0d9"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a807c21e00f00548037cd10d4bab64347"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classThreadPoolJob.html#a807c21e00f00548037cd10d4bab64347">isRunning</a> () const noexcept</td></tr>
<tr class="memdesc:a807c21e00f00548037cd10d4bab64347"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if this job is currently running its <a class="el" href="classThreadPoolJob.html#aec49c01680e563257c79088dc87bc0d9" title="Peforms the actual work that this job needs to do. ">runJob()</a> method. <a href="#a807c21e00f00548037cd10d4bab64347">More...</a><br /></td></tr>
<tr class="separator:a807c21e00f00548037cd10d4bab64347"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a441a94cba7ec96242fd7268371d9c5ea"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classThreadPoolJob.html#a441a94cba7ec96242fd7268371d9c5ea">shouldExit</a> () const noexcept</td></tr>
<tr class="memdesc:a441a94cba7ec96242fd7268371d9c5ea"><td class="mdescLeft"> </td><td class="mdescRight">Returns true if something is trying to interrupt this job and make it stop. <a href="#a441a94cba7ec96242fd7268371d9c5ea">More...</a><br /></td></tr>
<tr class="separator:a441a94cba7ec96242fd7268371d9c5ea"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:acf58a7de172ae74d6ebb4a9fb59ed4d3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classThreadPoolJob.html#acf58a7de172ae74d6ebb4a9fb59ed4d3">signalJobShouldExit</a> ()</td></tr>
<tr class="memdesc:acf58a7de172ae74d6ebb4a9fb59ed4d3"><td class="mdescLeft"> </td><td class="mdescRight">Calling this will cause the <a class="el" href="classThreadPoolJob.html#a441a94cba7ec96242fd7268371d9c5ea" title="Returns true if something is trying to interrupt this job and make it stop. ">shouldExit()</a> method to return true, and the job should (if it's been implemented correctly) stop as soon as possible. <a href="#acf58a7de172ae74d6ebb4a9fb59ed4d3">More...</a><br /></td></tr>
<tr class="separator:acf58a7de172ae74d6ebb4a9fb59ed4d3"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ac9524c73da9de5444dd13d5936e238ee"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classThreadPoolJob.html">ThreadPoolJob</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classThreadPoolJob.html#ac9524c73da9de5444dd13d5936e238ee">getCurrentThreadPoolJob</a> ()</td></tr>
<tr class="memdesc:ac9524c73da9de5444dd13d5936e238ee"><td class="mdescLeft"> </td><td class="mdescRight">If the calling thread is being invoked inside a <a class="el" href="classThreadPoolJob.html#aec49c01680e563257c79088dc87bc0d9" title="Peforms the actual work that this job needs to do. ">runJob()</a> method, this will return the <a class="el" href="classThreadPoolJob.html" title="A task that is executed by a ThreadPool object. ">ThreadPoolJob</a> that it belongs to. <a href="#ac9524c73da9de5444dd13d5936e238ee">More...</a><br /></td></tr>
<tr class="separator:ac9524c73da9de5444dd13d5936e238ee"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A task that is executed by a <a class="el" href="classThreadPool.html" title="A set of threads that will run a list of jobs. ">ThreadPool</a> object. </p>
<p>A <a class="el" href="classThreadPool.html" title="A set of threads that will run a list of jobs. ">ThreadPool</a> keeps a list of <a class="el" href="classThreadPoolJob.html" title="A task that is executed by a ThreadPool object. ">ThreadPoolJob</a> objects which are executed by its threads.</p>
<p>The <a class="el" href="classThreadPoolJob.html#aec49c01680e563257c79088dc87bc0d9" title="Peforms the actual work that this job needs to do. ">runJob()</a> method needs to be implemented to do the task, and if the code that does the work takes a significant time to run, it must keep checking the <a class="el" href="classThreadPoolJob.html#a441a94cba7ec96242fd7268371d9c5ea" title="Returns true if something is trying to interrupt this job and make it stop. ">shouldExit()</a> method to see if something is trying to interrupt the job. If <a class="el" href="classThreadPoolJob.html#a441a94cba7ec96242fd7268371d9c5ea" title="Returns true if something is trying to interrupt this job and make it stop. ">shouldExit()</a> returns true, the <a class="el" href="classThreadPoolJob.html#aec49c01680e563257c79088dc87bc0d9" title="Peforms the actual work that this job needs to do. ">runJob()</a> method must return immediately.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classThreadPool.html" title="A set of threads that will run a list of jobs. ">ThreadPool</a>, <a class="el" href="classThread.html" title="Encapsulates a thread. ">Thread</a> </dd></dl>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a id="a534c077f3c60168d88555ade062420b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a534c077f3c60168d88555ade062420b3">§ </a></span>JobStatus</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="classThreadPoolJob.html#a534c077f3c60168d88555ade062420b3">ThreadPoolJob::JobStatus</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>These are the values that can be returned by the <a class="el" href="classThreadPoolJob.html#aec49c01680e563257c79088dc87bc0d9" title="Peforms the actual work that this job needs to do. ">runJob()</a> method. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a534c077f3c60168d88555ade062420b3a390a063ef5f8b769a682f1daefc64e72"></a>jobHasFinished </td><td class="fielddoc"><p>indicates that the job has finished and can be removed from the pool. </p>
</td></tr>
<tr><td class="fieldname"><a id="a534c077f3c60168d88555ade062420b3a42789d58048631dd96008ce23911a545"></a>jobNeedsRunningAgain </td><td class="fielddoc"><p>indicates that the job would like to be called again when a thread is free. </p>
</td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Constructor & Destructor Documentation</h2>
<a id="a701138425809122d1271561fcfa1c20d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a701138425809122d1271561fcfa1c20d">§ </a></span>ThreadPoolJob()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">ThreadPoolJob::ThreadPoolJob </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classString.html">String</a> & </td>
<td class="paramname"><em>name</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a thread pool job object. </p>
<p>After creating your job, add it to a thread pool with <a class="el" href="classThreadPool.html#ad46e866e912868092fff107dc555443b" title="Adds a job to the queue. ">ThreadPool::addJob()</a>. </p>
</div>
</div>
<a id="a519d648535cefc3aed07455dd5dd9e5b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a519d648535cefc3aed07455dd5dd9e5b">§ </a></span>~ThreadPoolJob()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual ThreadPoolJob::~ThreadPoolJob </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Destructor. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ac38d4b20b57d6dbf46140709f573ea1f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac38d4b20b57d6dbf46140709f573ea1f">§ </a></span>getJobName()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classString.html">String</a> ThreadPoolJob::getJobName </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the name of this job. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classThreadPoolJob.html#a0005910260394539b8117a858f5b4cfb" title="Changes the job's name. ">setJobName</a> </dd></dl>
</div>
</div>
<a id="a0005910260394539b8117a858f5b4cfb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0005910260394539b8117a858f5b4cfb">§ </a></span>setJobName()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ThreadPoolJob::setJobName </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classString.html">String</a> & </td>
<td class="paramname"><em>newName</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Changes the job's name. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classThreadPoolJob.html#ac38d4b20b57d6dbf46140709f573ea1f" title="Returns the name of this job. ">getJobName</a> </dd></dl>
</div>
</div>
<a id="aec49c01680e563257c79088dc87bc0d9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aec49c01680e563257c79088dc87bc0d9">§ </a></span>runJob()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classThreadPoolJob.html#a534c077f3c60168d88555ade062420b3">JobStatus</a> ThreadPoolJob::runJob </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Peforms the actual work that this job needs to do. </p>
<p>Your subclass must implement this method, in which is does its work.</p>
<p>If the code in this method takes a significant time to run, it must repeatedly check the <a class="el" href="classThreadPoolJob.html#a441a94cba7ec96242fd7268371d9c5ea" title="Returns true if something is trying to interrupt this job and make it stop. ">shouldExit()</a> method to see if something is trying to interrupt the job. If <a class="el" href="classThreadPoolJob.html#a441a94cba7ec96242fd7268371d9c5ea" title="Returns true if something is trying to interrupt this job and make it stop. ">shouldExit()</a> ever returns true, the <a class="el" href="classThreadPoolJob.html#aec49c01680e563257c79088dc87bc0d9" title="Peforms the actual work that this job needs to do. ">runJob()</a> method must return immediately.</p>
<p>If this method returns jobHasFinished, then the job will be removed from the pool immediately. If it returns jobNeedsRunningAgain, then the job will be left in the pool and will get a chance to run again as soon as a thread is free.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classThreadPoolJob.html#a441a94cba7ec96242fd7268371d9c5ea" title="Returns true if something is trying to interrupt this job and make it stop. ">shouldExit()</a> </dd></dl>
</div>
</div>
<a id="a807c21e00f00548037cd10d4bab64347"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a807c21e00f00548037cd10d4bab64347">§ </a></span>isRunning()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool ThreadPoolJob::isRunning </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns true if this job is currently running its <a class="el" href="classThreadPoolJob.html#aec49c01680e563257c79088dc87bc0d9" title="Peforms the actual work that this job needs to do. ">runJob()</a> method. </p>
</div>
</div>
<a id="a441a94cba7ec96242fd7268371d9c5ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a441a94cba7ec96242fd7268371d9c5ea">§ </a></span>shouldExit()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool ThreadPoolJob::shouldExit </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns true if something is trying to interrupt this job and make it stop. </p>
<p>Your <a class="el" href="classThreadPoolJob.html#aec49c01680e563257c79088dc87bc0d9" title="Peforms the actual work that this job needs to do. ">runJob()</a> method must call this whenever it gets a chance, and if it ever returns true, the <a class="el" href="classThreadPoolJob.html#aec49c01680e563257c79088dc87bc0d9" title="Peforms the actual work that this job needs to do. ">runJob()</a> method must return immediately.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classThreadPoolJob.html#acf58a7de172ae74d6ebb4a9fb59ed4d3" title="Calling this will cause the shouldExit() method to return true, and the job should (if it's been impl...">signalJobShouldExit()</a> </dd></dl>
</div>
</div>
<a id="acf58a7de172ae74d6ebb4a9fb59ed4d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acf58a7de172ae74d6ebb4a9fb59ed4d3">§ </a></span>signalJobShouldExit()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void ThreadPoolJob::signalJobShouldExit </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Calling this will cause the <a class="el" href="classThreadPoolJob.html#a441a94cba7ec96242fd7268371d9c5ea" title="Returns true if something is trying to interrupt this job and make it stop. ">shouldExit()</a> method to return true, and the job should (if it's been implemented correctly) stop as soon as possible. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classThreadPoolJob.html#a441a94cba7ec96242fd7268371d9c5ea" title="Returns true if something is trying to interrupt this job and make it stop. ">shouldExit()</a> </dd></dl>
</div>
</div>
<a id="ac9524c73da9de5444dd13d5936e238ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac9524c73da9de5444dd13d5936e238ee">§ </a></span>getCurrentThreadPoolJob()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classThreadPoolJob.html">ThreadPoolJob</a>* ThreadPoolJob::getCurrentThreadPoolJob </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>If the calling thread is being invoked inside a <a class="el" href="classThreadPoolJob.html#aec49c01680e563257c79088dc87bc0d9" title="Peforms the actual work that this job needs to do. ">runJob()</a> method, this will return the <a class="el" href="classThreadPoolJob.html" title="A task that is executed by a ThreadPool object. ">ThreadPoolJob</a> that it belongs to. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="juce__ThreadPool_8h.html">juce_ThreadPool.h</a></li>
</ul>
</div><!-- contents -->
<hr class="footer"/>
<address class="footer"><small>All content © ROLI Ltd.</small></address><br/>
</body>
</html>
|