This file is indexed.

/usr/share/doc/libjuce/apiref/classThread.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
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
<!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: Thread 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> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="classThread-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Thread Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Encapsulates a thread.  
 <a href="classThread.html#details">More...</a></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for Thread:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
 <div class="center">
  <img src="classThread.png" usemap="#Thread_map" alt=""/>
  <map id="Thread_map" name="Thread_map">
<area href="classInterprocessConnectionServer.html" title="An object that waits for client sockets to connect to a port on this host, and creates InterprocessCo..." alt="InterprocessConnectionServer" shape="rect" coords="0,56,185,80"/>
<area href="classMidiOutput.html" title="Controls a physical MIDI output device. " alt="MidiOutput" shape="rect" coords="195,56,380,80"/>
<area href="classThreadWithProgressWindow.html" title="A thread that automatically pops up a modal dialog box with a progress bar and cancel button while it..." alt="ThreadWithProgressWindow" shape="rect" coords="390,56,575,80"/>
<area href="classTimeSliceThread.html" title="A thread that keeps a list of clients, and calls each one in turn, giving them all a chance to run so..." alt="TimeSliceThread" shape="rect" coords="585,56,770,80"/>
</map>
 </div></div>
<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:a077e20855a3c974c2fc6f9e7caa8412c"><td class="memItemLeft" align="right" valign="top">typedef void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a077e20855a3c974c2fc6f9e7caa8412c">ThreadID</a></td></tr>
<tr class="memdesc:a077e20855a3c974c2fc6f9e7caa8412c"><td class="mdescLeft">&#160;</td><td class="mdescRight">A value type used for thread IDs.  <a href="#a077e20855a3c974c2fc6f9e7caa8412c">More...</a><br /></td></tr>
<tr class="separator:a077e20855a3c974c2fc6f9e7caa8412c"><td class="memSeparator" colspan="2">&#160;</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:a9105c0abed75dd620b80c8c5e8b01603"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a9105c0abed75dd620b80c8c5e8b01603">Thread</a> (const <a class="el" href="classString.html">String</a> &amp;threadName, size_t threadStackSize=0)</td></tr>
<tr class="memdesc:a9105c0abed75dd620b80c8c5e8b01603"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a thread.  <a href="#a9105c0abed75dd620b80c8c5e8b01603">More...</a><br /></td></tr>
<tr class="separator:a9105c0abed75dd620b80c8c5e8b01603"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a026b23628e1727050e864e00489c0baf"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a026b23628e1727050e864e00489c0baf">~Thread</a> ()</td></tr>
<tr class="memdesc:a026b23628e1727050e864e00489c0baf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#a026b23628e1727050e864e00489c0baf">More...</a><br /></td></tr>
<tr class="separator:a026b23628e1727050e864e00489c0baf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae90dfabab3e1776cf01a26e7ee3a620"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#aae90dfabab3e1776cf01a26e7ee3a620">run</a> ()=0</td></tr>
<tr class="memdesc:aae90dfabab3e1776cf01a26e7ee3a620"><td class="mdescLeft">&#160;</td><td class="mdescRight">Must be implemented to perform the thread's actual code.  <a href="#aae90dfabab3e1776cf01a26e7ee3a620">More...</a><br /></td></tr>
<tr class="separator:aae90dfabab3e1776cf01a26e7ee3a620"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5502205d727c00752f95af27a063d983"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a5502205d727c00752f95af27a063d983">startThread</a> ()</td></tr>
<tr class="memdesc:a5502205d727c00752f95af27a063d983"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts the thread running.  <a href="#a5502205d727c00752f95af27a063d983">More...</a><br /></td></tr>
<tr class="separator:a5502205d727c00752f95af27a063d983"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc4aff2ceb97b0f16a0a08132315a900"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#acc4aff2ceb97b0f16a0a08132315a900">startThread</a> (int priority)</td></tr>
<tr class="memdesc:acc4aff2ceb97b0f16a0a08132315a900"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts the thread with a given priority.  <a href="#acc4aff2ceb97b0f16a0a08132315a900">More...</a><br /></td></tr>
<tr class="separator:acc4aff2ceb97b0f16a0a08132315a900"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a18583d51411d6a34c59b63f0adff4697"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a18583d51411d6a34c59b63f0adff4697">stopThread</a> (int timeOutMilliseconds)</td></tr>
<tr class="memdesc:a18583d51411d6a34c59b63f0adff4697"><td class="mdescLeft">&#160;</td><td class="mdescRight">Attempts to stop the thread running.  <a href="#a18583d51411d6a34c59b63f0adff4697">More...</a><br /></td></tr>
<tr class="separator:a18583d51411d6a34c59b63f0adff4697"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc4e7957f1c3a3f98218324c0fdc3beb"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#afc4e7957f1c3a3f98218324c0fdc3beb">isThreadRunning</a> () const</td></tr>
<tr class="memdesc:afc4e7957f1c3a3f98218324c0fdc3beb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns true if the thread is currently active.  <a href="#afc4e7957f1c3a3f98218324c0fdc3beb">More...</a><br /></td></tr>
<tr class="separator:afc4e7957f1c3a3f98218324c0fdc3beb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:affe168e27c6ee50b0d10522810772268"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#affe168e27c6ee50b0d10522810772268">signalThreadShouldExit</a> ()</td></tr>
<tr class="memdesc:affe168e27c6ee50b0d10522810772268"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets a flag to tell the thread it should stop.  <a href="#affe168e27c6ee50b0d10522810772268">More...</a><br /></td></tr>
<tr class="separator:affe168e27c6ee50b0d10522810772268"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab89b68d53514e0b3978460aab3202fd7"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#ab89b68d53514e0b3978460aab3202fd7">threadShouldExit</a> () const</td></tr>
<tr class="memdesc:ab89b68d53514e0b3978460aab3202fd7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether the thread has been told to stop running.  <a href="#ab89b68d53514e0b3978460aab3202fd7">More...</a><br /></td></tr>
<tr class="separator:ab89b68d53514e0b3978460aab3202fd7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9b6494f25d5d8eb07ed6fc96178eac5"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#ad9b6494f25d5d8eb07ed6fc96178eac5">waitForThreadToExit</a> (int timeOutMilliseconds) const</td></tr>
<tr class="memdesc:ad9b6494f25d5d8eb07ed6fc96178eac5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Waits for the thread to stop.  <a href="#ad9b6494f25d5d8eb07ed6fc96178eac5">More...</a><br /></td></tr>
<tr class="separator:ad9b6494f25d5d8eb07ed6fc96178eac5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0975d9ee9f403f5f82287fcce4a7168f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a0975d9ee9f403f5f82287fcce4a7168f">setPriority</a> (int priority)</td></tr>
<tr class="memdesc:a0975d9ee9f403f5f82287fcce4a7168f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Changes the thread's priority.  <a href="#a0975d9ee9f403f5f82287fcce4a7168f">More...</a><br /></td></tr>
<tr class="separator:a0975d9ee9f403f5f82287fcce4a7168f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a614605563fceeac6f03d507bc35bdce4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a614605563fceeac6f03d507bc35bdce4">setAffinityMask</a> (<a class="el" href="juce__MathsFunctions_8h.html#a1134b580f8da4de94ca6b1de4d37975e">uint32</a> affinityMask)</td></tr>
<tr class="memdesc:a614605563fceeac6f03d507bc35bdce4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the affinity mask for the thread.  <a href="#a614605563fceeac6f03d507bc35bdce4">More...</a><br /></td></tr>
<tr class="separator:a614605563fceeac6f03d507bc35bdce4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a99ac29606fd57fd418dfd169939f7b25"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a99ac29606fd57fd418dfd169939f7b25">wait</a> (int timeOutMilliseconds) const</td></tr>
<tr class="memdesc:a99ac29606fd57fd418dfd169939f7b25"><td class="mdescLeft">&#160;</td><td class="mdescRight">Makes the thread wait for a notification.  <a href="#a99ac29606fd57fd418dfd169939f7b25">More...</a><br /></td></tr>
<tr class="separator:a99ac29606fd57fd418dfd169939f7b25"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b4d5a1ffaa35cc13f323a0524012a2b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a0b4d5a1ffaa35cc13f323a0524012a2b">notify</a> () const</td></tr>
<tr class="memdesc:a0b4d5a1ffaa35cc13f323a0524012a2b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wakes up the thread.  <a href="#a0b4d5a1ffaa35cc13f323a0524012a2b">More...</a><br /></td></tr>
<tr class="separator:a0b4d5a1ffaa35cc13f323a0524012a2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a39ca822734b9b20ab32eeba774c9a803"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classThread.html#a077e20855a3c974c2fc6f9e7caa8412c">ThreadID</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a39ca822734b9b20ab32eeba774c9a803">getThreadId</a> () const noexcept</td></tr>
<tr class="memdesc:a39ca822734b9b20ab32eeba774c9a803"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the ID of this thread.  <a href="#a39ca822734b9b20ab32eeba774c9a803">More...</a><br /></td></tr>
<tr class="separator:a39ca822734b9b20ab32eeba774c9a803"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d416be2e075de0be64ba958ac0efc17"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classString.html">String</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a0d416be2e075de0be64ba958ac0efc17">getThreadName</a> () const</td></tr>
<tr class="memdesc:a0d416be2e075de0be64ba958ac0efc17"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the name of the thread.  <a href="#a0d416be2e075de0be64ba958ac0efc17">More...</a><br /></td></tr>
<tr class="separator:a0d416be2e075de0be64ba958ac0efc17"><td class="memSeparator" colspan="2">&#160;</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:ac92778089556fd0b5ab9c31557669ce8"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#ac92778089556fd0b5ab9c31557669ce8">currentThreadShouldExit</a> ()</td></tr>
<tr class="memdesc:ac92778089556fd0b5ab9c31557669ce8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks whether the current thread has been told to stop running.  <a href="#ac92778089556fd0b5ab9c31557669ce8">More...</a><br /></td></tr>
<tr class="separator:ac92778089556fd0b5ab9c31557669ce8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a777202bb5aa9ce7f57605674b100f4"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a9a777202bb5aa9ce7f57605674b100f4">setCurrentThreadPriority</a> (int priority)</td></tr>
<tr class="memdesc:a9a777202bb5aa9ce7f57605674b100f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Changes the priority of the caller thread.  <a href="#a9a777202bb5aa9ce7f57605674b100f4">More...</a><br /></td></tr>
<tr class="separator:a9a777202bb5aa9ce7f57605674b100f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac21eb5ae8c32bc2ecacba904f3411802"><td class="memItemLeft" align="right" valign="top">static void <a class="el" href="juce__PlatformDefs_8h.html#af0b3f78ca801d88a7912f4c6bbf50e58">JUCE_CALLTYPE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#ac21eb5ae8c32bc2ecacba904f3411802">setCurrentThreadAffinityMask</a> (<a class="el" href="juce__MathsFunctions_8h.html#a1134b580f8da4de94ca6b1de4d37975e">uint32</a> affinityMask)</td></tr>
<tr class="memdesc:ac21eb5ae8c32bc2ecacba904f3411802"><td class="mdescLeft">&#160;</td><td class="mdescRight">Changes the affinity mask for the caller thread.  <a href="#ac21eb5ae8c32bc2ecacba904f3411802">More...</a><br /></td></tr>
<tr class="separator:ac21eb5ae8c32bc2ecacba904f3411802"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ee1ddee32aa82ac90bc567cb7427926"><td class="memItemLeft" align="right" valign="top">static void <a class="el" href="juce__PlatformDefs_8h.html#af0b3f78ca801d88a7912f4c6bbf50e58">JUCE_CALLTYPE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a4ee1ddee32aa82ac90bc567cb7427926">sleep</a> (int milliseconds)</td></tr>
<tr class="separator:a4ee1ddee32aa82ac90bc567cb7427926"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf47a344b3b715e49ffcbc6119c72cdc"><td class="memItemLeft" align="right" valign="top">static void <a class="el" href="juce__PlatformDefs_8h.html#af0b3f78ca801d88a7912f4c6bbf50e58">JUCE_CALLTYPE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#aaf47a344b3b715e49ffcbc6119c72cdc">yield</a> ()</td></tr>
<tr class="memdesc:aaf47a344b3b715e49ffcbc6119c72cdc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Yields the calling thread's current time-slot.  <a href="#aaf47a344b3b715e49ffcbc6119c72cdc">More...</a><br /></td></tr>
<tr class="separator:aaf47a344b3b715e49ffcbc6119c72cdc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd4762b20144186ffc28280cedd224e9"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classThread.html#a077e20855a3c974c2fc6f9e7caa8412c">ThreadID</a> <a class="el" href="juce__PlatformDefs_8h.html#af0b3f78ca801d88a7912f4c6bbf50e58">JUCE_CALLTYPE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#abd4762b20144186ffc28280cedd224e9">getCurrentThreadId</a> ()</td></tr>
<tr class="memdesc:abd4762b20144186ffc28280cedd224e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an id that identifies the caller thread.  <a href="#abd4762b20144186ffc28280cedd224e9">More...</a><br /></td></tr>
<tr class="separator:abd4762b20144186ffc28280cedd224e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a40a9f45ea3ff9a7d39a50f78059640cd"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classThread.html">Thread</a> *<a class="el" href="juce__PlatformDefs_8h.html#af0b3f78ca801d88a7912f4c6bbf50e58">JUCE_CALLTYPE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a40a9f45ea3ff9a7d39a50f78059640cd">getCurrentThread</a> ()</td></tr>
<tr class="memdesc:a40a9f45ea3ff9a7d39a50f78059640cd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finds the thread object that is currently running.  <a href="#a40a9f45ea3ff9a7d39a50f78059640cd">More...</a><br /></td></tr>
<tr class="separator:a40a9f45ea3ff9a7d39a50f78059640cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ba2a683ea8111c08db83092360b7226"><td class="memItemLeft" align="right" valign="top">static void <a class="el" href="juce__PlatformDefs_8h.html#af0b3f78ca801d88a7912f4c6bbf50e58">JUCE_CALLTYPE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classThread.html#a8ba2a683ea8111c08db83092360b7226">setCurrentThreadName</a> (const <a class="el" href="classString.html">String</a> &amp;newThreadName)</td></tr>
<tr class="memdesc:a8ba2a683ea8111c08db83092360b7226"><td class="mdescLeft">&#160;</td><td class="mdescRight">Changes the name of the caller thread.  <a href="#a8ba2a683ea8111c08db83092360b7226">More...</a><br /></td></tr>
<tr class="separator:a8ba2a683ea8111c08db83092360b7226"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Encapsulates a thread. </p>
<p>Subclasses derive from <a class="el" href="classThread.html" title="Encapsulates a thread. ">Thread</a> and implement the <a class="el" href="classThread.html#aae90dfabab3e1776cf01a26e7ee3a620" title="Must be implemented to perform the thread&#39;s actual code. ">run()</a> method, in which they do their business. The thread can then be started with the <a class="el" href="classThread.html#a5502205d727c00752f95af27a063d983" title="Starts the thread running. ">startThread()</a> method and controlled with various other methods.</p>
<p>This class also contains some thread-related static methods, such as <a class="el" href="classThread.html#a4ee1ddee32aa82ac90bc567cb7427926">sleep()</a>, <a class="el" href="classThread.html#aaf47a344b3b715e49ffcbc6119c72cdc" title="Yields the calling thread&#39;s current time-slot. ">yield()</a>, <a class="el" href="classThread.html#abd4762b20144186ffc28280cedd224e9" title="Returns an id that identifies the caller thread. ">getCurrentThreadId()</a> etc.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classCriticalSection.html" title="A re-entrant mutex. ">CriticalSection</a>, <a class="el" href="classWaitableEvent.html" title="Allows threads to wait for events triggered by other threads. ">WaitableEvent</a>, <a class="el" href="classProcess.html" title="Represents the current executable&#39;s process. ">Process</a>, <a class="el" href="classThreadWithProgressWindow.html" title="A thread that automatically pops up a modal dialog box with a progress bar and cancel button while it...">ThreadWithProgressWindow</a>, <a class="el" href="classMessageManagerLock.html" title="Used to make sure that the calling thread has exclusive access to the message loop. ">MessageManagerLock</a> </dd></dl>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a077e20855a3c974c2fc6f9e7caa8412c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a077e20855a3c974c2fc6f9e7caa8412c">&sect;&nbsp;</a></span>ThreadID</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void* <a class="el" href="classThread.html#a077e20855a3c974c2fc6f9e7caa8412c">Thread::ThreadID</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>A value type used for thread IDs. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classThread.html#abd4762b20144186ffc28280cedd224e9" title="Returns an id that identifies the caller thread. ">getCurrentThreadId()</a>, <a class="el" href="classThread.html#a39ca822734b9b20ab32eeba774c9a803" title="Returns the ID of this thread. ">getThreadId()</a> </dd></dl>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a9105c0abed75dd620b80c8c5e8b01603"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9105c0abed75dd620b80c8c5e8b01603">&sect;&nbsp;</a></span>Thread()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">Thread::Thread </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classString.html">String</a> &amp;&#160;</td>
          <td class="paramname"><em>threadName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>threadStackSize</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</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. </p>
<p>When first created, the thread is not running. Use the <a class="el" href="classThread.html#a5502205d727c00752f95af27a063d983" title="Starts the thread running. ">startThread()</a> method to start it.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">threadName</td><td>The name of the thread which typically appears in debug logs and profiles. </td></tr>
    <tr><td class="paramname">threadStackSize</td><td>The size of the stack of the thread. If this value is zero then the default stack size of the OS will be used. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a026b23628e1727050e864e00489c0baf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a026b23628e1727050e864e00489c0baf">&sect;&nbsp;</a></span>~Thread()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual Thread::~Thread </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>
<p>You must never attempt to delete a <a class="el" href="classThread.html" title="Encapsulates a thread. ">Thread</a> object while it's still running - always call <a class="el" href="classThread.html#a18583d51411d6a34c59b63f0adff4697" title="Attempts to stop the thread running. ">stopThread()</a> and make sure your thread has stopped before deleting the object. Failing to do so will throw an assertion, and put you firmly into undefined behaviour territory. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="aae90dfabab3e1776cf01a26e7ee3a620"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aae90dfabab3e1776cf01a26e7ee3a620">&sect;&nbsp;</a></span>run()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Thread::run </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>Must be implemented to perform the thread's actual code. </p>
<p>Remember that the thread must regularly check the <a class="el" href="classThread.html#ab89b68d53514e0b3978460aab3202fd7" title="Checks whether the thread has been told to stop running. ">threadShouldExit()</a> method whilst running, and if this returns true it should return from the <a class="el" href="classThread.html#aae90dfabab3e1776cf01a26e7ee3a620" title="Must be implemented to perform the thread&#39;s actual code. ">run()</a> method as soon as possible to avoid being forcibly killed.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classThread.html#ab89b68d53514e0b3978460aab3202fd7" title="Checks whether the thread has been told to stop running. ">threadShouldExit</a>, <a class="el" href="classThread.html#a5502205d727c00752f95af27a063d983" title="Starts the thread running. ">startThread</a> </dd></dl>

<p>Referenced by <a class="el" href="classMidiOutput.html#a5662e29a58faebe2398b9be73728cf54">MidiOutput::getName()</a>.</p>

</div>
</div>
<a id="a5502205d727c00752f95af27a063d983"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5502205d727c00752f95af27a063d983">&sect;&nbsp;</a></span>startThread() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Thread::startThread </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Starts the thread running. </p>
<p>This will cause the thread's <a class="el" href="classThread.html#aae90dfabab3e1776cf01a26e7ee3a620" title="Must be implemented to perform the thread&#39;s actual code. ">run()</a> method to be called by a new thread. If this thread is already running, <a class="el" href="classThread.html#a5502205d727c00752f95af27a063d983" title="Starts the thread running. ">startThread()</a> won't do anything.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classThread.html#a18583d51411d6a34c59b63f0adff4697" title="Attempts to stop the thread running. ">stopThread</a> </dd></dl>

</div>
</div>
<a id="acc4aff2ceb97b0f16a0a08132315a900"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acc4aff2ceb97b0f16a0a08132315a900">&sect;&nbsp;</a></span>startThread() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Thread::startThread </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>priority</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Starts the thread with a given priority. </p>
<p>Launches the thread with a given priority, where 0 = lowest, 10 = highest. If the thread is already running, its priority will be changed.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classThread.html#a5502205d727c00752f95af27a063d983" title="Starts the thread running. ">startThread</a>, <a class="el" href="classThread.html#a0975d9ee9f403f5f82287fcce4a7168f" title="Changes the thread&#39;s priority. ">setPriority</a> </dd></dl>

</div>
</div>
<a id="a18583d51411d6a34c59b63f0adff4697"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a18583d51411d6a34c59b63f0adff4697">&sect;&nbsp;</a></span>stopThread()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Thread::stopThread </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeOutMilliseconds</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Attempts to stop the thread running. </p>
<p>This method will cause the <a class="el" href="classThread.html#ab89b68d53514e0b3978460aab3202fd7" title="Checks whether the thread has been told to stop running. ">threadShouldExit()</a> method to return true and call <a class="el" href="classThread.html#a0b4d5a1ffaa35cc13f323a0524012a2b" title="Wakes up the thread. ">notify()</a> in case the thread is currently waiting.</p>
<p>Hopefully the thread will then respond to this by exiting cleanly, and the stopThread method will wait for a given time-period for this to happen.</p>
<p>If the thread is stuck and fails to respond after the time-out, it gets forcibly killed, which is a very bad thing to happen, as it could still be holding locks, etc. which are needed by other parts of your program.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">timeOutMilliseconds</td><td>The number of milliseconds to wait for the thread to finish before killing it by force. A negative value in here will wait forever. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the thread was cleanly stopped before the timeout, or false if it had to be killed by force. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classThread.html#affe168e27c6ee50b0d10522810772268" title="Sets a flag to tell the thread it should stop. ">signalThreadShouldExit</a>, <a class="el" href="classThread.html#ab89b68d53514e0b3978460aab3202fd7" title="Checks whether the thread has been told to stop running. ">threadShouldExit</a>, <a class="el" href="classThread.html#ad9b6494f25d5d8eb07ed6fc96178eac5" title="Waits for the thread to stop. ">waitForThreadToExit</a>, <a class="el" href="classThread.html#afc4e7957f1c3a3f98218324c0fdc3beb" title="Returns true if the thread is currently active. ">isThreadRunning</a> </dd></dl>

</div>
</div>
<a id="afc4e7957f1c3a3f98218324c0fdc3beb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afc4e7957f1c3a3f98218324c0fdc3beb">&sect;&nbsp;</a></span>isThreadRunning()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Thread::isThreadRunning </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns true if the thread is currently active. </p>

</div>
</div>
<a id="affe168e27c6ee50b0d10522810772268"></a>
<h2 class="memtitle"><span class="permalink"><a href="#affe168e27c6ee50b0d10522810772268">&sect;&nbsp;</a></span>signalThreadShouldExit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Thread::signalThreadShouldExit </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets a flag to tell the thread it should stop. </p>
<p>Calling this means that the <a class="el" href="classThread.html#ab89b68d53514e0b3978460aab3202fd7" title="Checks whether the thread has been told to stop running. ">threadShouldExit()</a> method will then return true. The thread should be regularly checking this to see whether it should exit.</p>
<p>If your thread makes use of <a class="el" href="classThread.html#a99ac29606fd57fd418dfd169939f7b25" title="Makes the thread wait for a notification. ">wait()</a>, you might want to call <a class="el" href="classThread.html#a0b4d5a1ffaa35cc13f323a0524012a2b" title="Wakes up the thread. ">notify()</a> after calling this method, to interrupt any waits that might be in progress, and allow it to reach a point where it can exit.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classThread.html#ab89b68d53514e0b3978460aab3202fd7" title="Checks whether the thread has been told to stop running. ">threadShouldExit</a> </dd>
<dd>
<a class="el" href="classThread.html#ad9b6494f25d5d8eb07ed6fc96178eac5" title="Waits for the thread to stop. ">waitForThreadToExit</a> </dd></dl>

</div>
</div>
<a id="ab89b68d53514e0b3978460aab3202fd7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab89b68d53514e0b3978460aab3202fd7">&sect;&nbsp;</a></span>threadShouldExit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Thread::threadShouldExit </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Checks whether the thread has been told to stop running. </p>
<p>Threads need to check this regularly, and if it returns true, they should return from their <a class="el" href="classThread.html#aae90dfabab3e1776cf01a26e7ee3a620" title="Must be implemented to perform the thread&#39;s actual code. ">run()</a> method at the first possible opportunity.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classThread.html#affe168e27c6ee50b0d10522810772268" title="Sets a flag to tell the thread it should stop. ">signalThreadShouldExit</a>, <a class="el" href="classThread.html#ac92778089556fd0b5ab9c31557669ce8" title="Checks whether the current thread has been told to stop running. ">currentThreadShouldExit</a> </dd></dl>

<p>References <a class="el" href="juce__PlatformDefs_8h.html#af0b3f78ca801d88a7912f4c6bbf50e58">JUCE_CALLTYPE</a>.</p>

</div>
</div>
<a id="ac92778089556fd0b5ab9c31557669ce8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac92778089556fd0b5ab9c31557669ce8">&sect;&nbsp;</a></span>currentThreadShouldExit()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool Thread::currentThreadShouldExit </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>Checks whether the current thread has been told to stop running. </p>
<p>On the message thread, this will always return false, otherwise it will return <a class="el" href="classThread.html#ab89b68d53514e0b3978460aab3202fd7" title="Checks whether the thread has been told to stop running. ">threadShouldExit()</a> called on the current thread.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classThread.html#ab89b68d53514e0b3978460aab3202fd7" title="Checks whether the thread has been told to stop running. ">threadShouldExit</a> </dd></dl>

</div>
</div>
<a id="ad9b6494f25d5d8eb07ed6fc96178eac5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad9b6494f25d5d8eb07ed6fc96178eac5">&sect;&nbsp;</a></span>waitForThreadToExit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Thread::waitForThreadToExit </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeOutMilliseconds</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Waits for the thread to stop. </p>
<p>This will waits until <a class="el" href="classThread.html#afc4e7957f1c3a3f98218324c0fdc3beb" title="Returns true if the thread is currently active. ">isThreadRunning()</a> is false or until a timeout expires.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">timeOutMilliseconds</td><td>the time to wait, in milliseconds. If this value is less than zero, it will wait forever. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the thread exits, or false if the timeout expires first. </dd></dl>

</div>
</div>
<a id="a0975d9ee9f403f5f82287fcce4a7168f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0975d9ee9f403f5f82287fcce4a7168f">&sect;&nbsp;</a></span>setPriority()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Thread::setPriority </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>priority</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Changes the thread's priority. </p>
<p>May return false if for some reason the priority can't be changed.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">priority</td><td>the new priority, in the range 0 (lowest) to 10 (highest). A priority of 5 is normal. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a9a777202bb5aa9ce7f57605674b100f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9a777202bb5aa9ce7f57605674b100f4">&sect;&nbsp;</a></span>setCurrentThreadPriority()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static bool Thread::setCurrentThreadPriority </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>priority</em></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>Changes the priority of the caller thread. </p>
<p>Similar to <a class="el" href="classThread.html#a0975d9ee9f403f5f82287fcce4a7168f" title="Changes the thread&#39;s priority. ">setPriority()</a>, but this static method acts on the caller thread. May return false if for some reason the priority can't be changed.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classThread.html#a0975d9ee9f403f5f82287fcce4a7168f" title="Changes the thread&#39;s priority. ">setPriority</a> </dd></dl>

</div>
</div>
<a id="a614605563fceeac6f03d507bc35bdce4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a614605563fceeac6f03d507bc35bdce4">&sect;&nbsp;</a></span>setAffinityMask()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Thread::setAffinityMask </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="juce__MathsFunctions_8h.html#a1134b580f8da4de94ca6b1de4d37975e">uint32</a>&#160;</td>
          <td class="paramname"><em>affinityMask</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the affinity mask for the thread. </p>
<p>This will only have an effect next time the thread is started - i.e. if the thread is already running when called, it'll have no effect.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classThread.html#ac21eb5ae8c32bc2ecacba904f3411802" title="Changes the affinity mask for the caller thread. ">setCurrentThreadAffinityMask</a> </dd></dl>

</div>
</div>
<a id="ac21eb5ae8c32bc2ecacba904f3411802"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac21eb5ae8c32bc2ecacba904f3411802">&sect;&nbsp;</a></span>setCurrentThreadAffinityMask()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void <a class="el" href="juce__PlatformDefs_8h.html#af0b3f78ca801d88a7912f4c6bbf50e58">JUCE_CALLTYPE</a> Thread::setCurrentThreadAffinityMask </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="juce__MathsFunctions_8h.html#a1134b580f8da4de94ca6b1de4d37975e">uint32</a>&#160;</td>
          <td class="paramname"><em>affinityMask</em></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>Changes the affinity mask for the caller thread. </p>
<p>This will change the affinity mask for the thread that calls this static method. </p><dl class="section see"><dt>See also</dt><dd><a class="el" href="classThread.html#a614605563fceeac6f03d507bc35bdce4" title="Sets the affinity mask for the thread. ">setAffinityMask</a> </dd></dl>

</div>
</div>
<a id="a4ee1ddee32aa82ac90bc567cb7427926"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4ee1ddee32aa82ac90bc567cb7427926">&sect;&nbsp;</a></span>sleep()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void <a class="el" href="juce__PlatformDefs_8h.html#af0b3f78ca801d88a7912f4c6bbf50e58">JUCE_CALLTYPE</a> Thread::sleep </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>milliseconds</em></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">

</div>
</div>
<a id="aaf47a344b3b715e49ffcbc6119c72cdc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaf47a344b3b715e49ffcbc6119c72cdc">&sect;&nbsp;</a></span>yield()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void <a class="el" href="juce__PlatformDefs_8h.html#af0b3f78ca801d88a7912f4c6bbf50e58">JUCE_CALLTYPE</a> Thread::yield </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>Yields the calling thread's current time-slot. </p>

</div>
</div>
<a id="a99ac29606fd57fd418dfd169939f7b25"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a99ac29606fd57fd418dfd169939f7b25">&sect;&nbsp;</a></span>wait()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Thread::wait </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeOutMilliseconds</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Makes the thread wait for a notification. </p>
<p>This puts the thread to sleep until either the timeout period expires, or another thread calls the <a class="el" href="classThread.html#a0b4d5a1ffaa35cc13f323a0524012a2b" title="Wakes up the thread. ">notify()</a> method to wake it up.</p>
<p>A negative time-out value means that the method will wait indefinitely.</p>
<dl class="section return"><dt>Returns</dt><dd>true if the event has been signalled, false if the timeout expires. </dd></dl>

</div>
</div>
<a id="a0b4d5a1ffaa35cc13f323a0524012a2b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0b4d5a1ffaa35cc13f323a0524012a2b">&sect;&nbsp;</a></span>notify()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Thread::notify </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Wakes up the thread. </p>
<p>If the thread has called the <a class="el" href="classThread.html#a99ac29606fd57fd418dfd169939f7b25" title="Makes the thread wait for a notification. ">wait()</a> method, this will wake it up.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classThread.html#a99ac29606fd57fd418dfd169939f7b25" title="Makes the thread wait for a notification. ">wait</a> </dd></dl>

</div>
</div>
<a id="abd4762b20144186ffc28280cedd224e9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abd4762b20144186ffc28280cedd224e9">&sect;&nbsp;</a></span>getCurrentThreadId()</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="classThread.html#a077e20855a3c974c2fc6f9e7caa8412c">ThreadID</a> <a class="el" href="juce__PlatformDefs_8h.html#af0b3f78ca801d88a7912f4c6bbf50e58">JUCE_CALLTYPE</a> Thread::getCurrentThreadId </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>Returns an id that identifies the caller thread. </p>
<p>To find the ID of a particular thread object, use <a class="el" href="classThread.html#a39ca822734b9b20ab32eeba774c9a803" title="Returns the ID of this thread. ">getThreadId()</a>.</p>
<dl class="section return"><dt>Returns</dt><dd>a unique identifier that identifies the calling thread. </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classThread.html#a39ca822734b9b20ab32eeba774c9a803" title="Returns the ID of this thread. ">getThreadId</a> </dd></dl>

<p>Referenced by <a class="el" href="classThreadLocalValue.html#a0350ab3d9b5d1877dec3244d5b4e71e9">ThreadLocalValue&lt; Type &gt;::get()</a>, and <a class="el" href="classThreadLocalValue.html#a78af45671b2b057f0f584a75f79ff5b5">ThreadLocalValue&lt; Type &gt;::releaseCurrentThreadStorage()</a>.</p>

</div>
</div>
<a id="a40a9f45ea3ff9a7d39a50f78059640cd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a40a9f45ea3ff9a7d39a50f78059640cd">&sect;&nbsp;</a></span>getCurrentThread()</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="classThread.html">Thread</a>* <a class="el" href="juce__PlatformDefs_8h.html#af0b3f78ca801d88a7912f4c6bbf50e58">JUCE_CALLTYPE</a> Thread::getCurrentThread </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>Finds the thread object that is currently running. </p>
<p>Note that the main UI thread (or other non-Juce threads) don't have a <a class="el" href="classThread.html" title="Encapsulates a thread. ">Thread</a> object associated with them, so this will return nullptr. </p>

</div>
</div>
<a id="a39ca822734b9b20ab32eeba774c9a803"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a39ca822734b9b20ab32eeba774c9a803">&sect;&nbsp;</a></span>getThreadId()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classThread.html#a077e20855a3c974c2fc6f9e7caa8412c">ThreadID</a> Thread::getThreadId </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 the ID of this thread. </p>
<p>That means the ID of this thread object - not of the thread that's calling the method.</p>
<p>This can change when the thread is started and stopped, and will be invalid if the thread's not actually running.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classThread.html#abd4762b20144186ffc28280cedd224e9" title="Returns an id that identifies the caller thread. ">getCurrentThreadId</a> </dd></dl>

</div>
</div>
<a id="a0d416be2e075de0be64ba958ac0efc17"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0d416be2e075de0be64ba958ac0efc17">&sect;&nbsp;</a></span>getThreadName()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classString.html">String</a>&amp; Thread::getThreadName </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the name of the thread. </p>
<p>This is the name that gets set in the constructor. </p>

<p>References <a class="el" href="juce__StandardHeader_8h.html#a65961b3bfbda0ffb83750d914cee38fb">JUCE_API</a>, <a class="el" href="juce__PlatformDefs_8h.html#af0b3f78ca801d88a7912f4c6bbf50e58">JUCE_CALLTYPE</a>, and <a class="el" href="juce__PlatformDefs_8h.html#a851b02724a8158a7f746c66b5758b3dd">JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR</a>.</p>

</div>
</div>
<a id="a8ba2a683ea8111c08db83092360b7226"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8ba2a683ea8111c08db83092360b7226">&sect;&nbsp;</a></span>setCurrentThreadName()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void <a class="el" href="juce__PlatformDefs_8h.html#af0b3f78ca801d88a7912f4c6bbf50e58">JUCE_CALLTYPE</a> Thread::setCurrentThreadName </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classString.html">String</a> &amp;&#160;</td>
          <td class="paramname"><em>newThreadName</em></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>Changes the name of the caller thread. </p>
<p>Different OSes may place different length or content limits on this name. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="juce__Thread_8h.html">juce_Thread.h</a></li>
</ul>
</div><!-- contents -->
<hr class="footer"/>
<address class="footer"><small>All content &copy ROLI Ltd.</small></address><br/>
</body>
</html>