2026-08-19 01:42:47 +00:00
<!-- HTML header for doxygen 1.9.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
< html xmlns = "http://www.w3.org/1999/xhtml" lang = "en-US" >
< head >
< meta http-equiv = "Content-Type" content = "text/xhtml;charset=UTF-8" />
< meta http-equiv = "X-UA-Compatible" content = "IE=11" />
< meta name = "generator" content = "Doxygen 1.9.8" />
< meta name = "viewport" content = "width=device-width, initial-scale=1" />
< title > RTAB-Map: UThread 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 = "navtree.css" rel = "stylesheet" type = "text/css" />
< script type = "text/javascript" src = "resize.js" ></ script >
< script type = "text/javascript" src = "navtreedata.js" ></ script >
< script type = "text/javascript" src = "navtree.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" />
< link href = "doxygen-awesome.css" rel = "stylesheet" type = "text/css" />
< link href = "custom.css" rel = "stylesheet" type = "text/css" />
< script type = "text/javascript" > window . RTABMAP_DOC_ROOT = "" ;</ script >
< script type = "text/javascript" src = "../versions.js" ></ script >
< script type = "text/javascript" src = "version-switcher.js" ></ script >
< script type = "text/javascript" src = "doxygen-awesome-darkmode-toggle.js" ></ script >
< script type = "text/javascript" > DoxygenAwesomeDarkModeToggle . init ();</ script >
</ 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 id = "projectrow" >
< td id = "projectalign" >
2026-08-21 05:39:20 +00:00
< div id = "projectname" > RTAB-Map< span id = "projectnumber" >   0.23.11</ span >
2026-08-19 01:42:47 +00:00
</ div >
< div id = "projectbrief" > Real-Time Appearance-Based Mapping</ div >
</ td >
</ tr >
</ tbody >
</ table >
</ div >
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
var searchBox = new SearchBox ( "searchBox" , "search/" , '.html' );
/* @license-end */
</ script >
< script type = "text/javascript" src = "menudata.js" ></ script >
< script type = "text/javascript" src = "menu.js" ></ script >
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$ ( function () {
initMenu ( '' , true , false , 'search.php' , 'Search' );
$ ( document ). ready ( function () { init_search (); });
});
/* @license-end */
</ script >
< div id = "main-nav" ></ div >
</ div > <!-- top -->
< div id = "side-nav" class = "ui-resizable side-nav-resizable" >
< div id = "nav-tree" >
< div id = "nav-tree-contents" >
< div id = "nav-sync" class = "sync" ></ div >
</ div >
</ div >
< div id = "splitbar" style = "-moz-user-select:none;"
class = "ui-resizable-handle" >
</ div >
</ div >
< script type = "text/javascript" >
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$ ( document ). ready ( function (){ initNavTree ( 'classUThread.html' , '' ); initResizable (); });
/* @license-end */
</ script >
< div id = "doc-content" >
<!-- 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" >
< div id = "MSearchResults" >
< div class = "SRPage" >
< div id = "SRIndex" >
< div id = "SRResults" ></ div >
< div class = "SRStatus" id = "Loading" > Loading...</ div >
< div class = "SRStatus" id = "Searching" > Searching...</ div >
< div class = "SRStatus" id = "NoMatches" > No Matches</ div >
</ div >
</ div >
</ div >
</ div >
< 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 = "classUThread-members.html" > List of all members</ a > </ div >
< div class = "headertitle" >< div class = "title" > UThread Class Reference< span class = "mlabels" >< span class = "mlabel" > abstract</ span ></ span ></ div ></ div >
</ div > <!--header-->
< div class = "contents" >
< p >< code > #include < < a class = "el" href = "UThread_8h_source.html" > UThread.h</ a > > </ code ></ p >
< div class = "dynheader" >
Inheritance diagram for UThread:</ div >
< div class = "dyncontent" >
< div class = "center" >< img src = "classUThread__inherit__graph.png" border = "0" usemap = "#aUThread_inherit__map" alt = "Inheritance graph" /></ div >
< map name = "aUThread_inherit__map" id = "aUThread_inherit__map" >
< area shape = "rect" title = " " alt = "" coords = "197,203,275,228" />
< area shape = "rect" href = "classUEventDispatcher.html" title = " " alt = "" coords = "366,5,505,31" />
< area shape = "poly" title = " " alt = "" coords = "240,189,250,155,266,115,289,75,321,41,342,29,365,21,366,26,344,34,324,45,294,78,271,117,255,157,245,190" />
< area shape = "rect" href = "classUEventsManager.html" title = " " alt = "" coords = "369,55,502,80" />
< area shape = "poly" title = " " alt = "" coords = "246,189,275,138,296,112,321,90,344,79,368,71,369,76,346,84,324,95,300,116,279,141,250,192" />
< area shape = "rect" href = "classUObjDeletionThread.html" title = " " alt = "" coords = "339,104,531,129" />
< area shape = "poly" title = " " alt = "" coords = "256,190,285,164,321,140,355,127,357,132,324,144,289,168,260,194" />
< area shape = "rect" href = "classrtabmap_1_1CompressionThread.html" title = "Background thread to compress or uncompress images and generic matrices." alt = "" coords = "328,153,543,179" />
< area shape = "poly" title = " " alt = "" coords = "287,198,322,189,375,176,376,181,323,194,289,203" />
< area shape = "rect" href = "classrtabmap_1_1DBDriver.html" title = "Abstract database driver for RTAB-Map maps (signatures, links, words, statistics)." alt = "" coords = "363,203,507,228" />
< area shape = "poly" title = " " alt = "" coords = "288,213,363,213,363,218,288,218" />
< area shape = "rect" href = "classrtabmap_1_1IMUThread.html" title = "Background thread that replays IMU measurements from a CSV file." alt = "" coords = "357,252,513,277" />
< area shape = "poly" title = " " alt = "" coords = "289,228,323,238,371,249,370,255,322,243,287,234" />
< area shape = "rect" href = "classrtabmap_1_1OdometryThread.html" title = "Runs an Odometry front-end in its own thread, driven by events." alt = "" coords = "338,301,533,327" />
< area shape = "poly" title = " " alt = "" coords = "259,236,288,264,324,288,352,299,351,304,321,292,285,268,256,240" />
< area shape = "rect" href = "classrtabmap_1_1RtabmapThread.html" title = "Runs a Rtabmap instance in its own thread, driven by events." alt = "" coords = "341,351,530,376" />
< area shape = "poly" title = " " alt = "" coords = "250,239,279,290,299,316,324,337,346,348,343,353,321,342,296,320,274,293,245,242" />
< area shape = "rect" href = "classrtabmap_1_1SensorCaptureThread.html" title = "Thread-based sensor data capture and event posting for RTAB-Map." alt = "" coords = "323,400,548,425" />
< area shape = "poly" title = " " alt = "" coords = "245,241,255,275,271,314,293,354,324,387,343,398,340,402,321,391,289,357,266,317,250,276,240,242" />
< area shape = "rect" href = "classUThreadC_3_01void_01_4.html" title = " " alt = "" coords = "5,203,149,228" />
< area shape = "poly" title = " " alt = "" coords = "163,213,197,213,197,218,163,218" />
< area shape = "rect" href = "classrtabmap_1_1DBDriverSqlite3.html" title = "SQLite3 implementation of DBDriver for RTAB-Map map databases." alt = "" coords = "596,203,785,228" />
< area shape = "poly" title = " " alt = "" coords = "521,213,596,213,596,218,521,218" />
</ map >
< center >< span class = "legend" > [< a target = "top" href = "graph_legend.html" > legend</ a > ]</ span ></ center ></ div >
< div class = "dynheader" >
Collaboration diagram for UThread:</ div >
< div class = "dyncontent" >
< div class = "center" >< img src = "classUThread__coll__graph.png" border = "0" usemap = "#aUThread_coll__map" alt = "Collaboration graph" /></ div >
< map name = "aUThread_coll__map" id = "aUThread_coll__map" >
< area shape = "rect" title = " " alt = "" coords = "39,79,116,104" />
< area shape = "rect" href = "classUThreadC_3_01void_01_4.html" title = " " alt = "" coords = "5,5,149,31" />
< area shape = "poly" title = " " alt = "" coords = "80,44,80,79,75,79,75,44" />
</ map >
< center >< span class = "legend" > [< a target = "top" href = "graph_legend.html" > legend</ a > ]</ span ></ center ></ div >
< table class = "memberdecls" >
< tr class = "heading" >< td colspan = "2" >< h2 class = "groupheader" >< a id = "pub-types" name = "pub-types" ></ a >
Public Types</ h2 ></ td ></ tr >
< tr class = "memitem:a731ef4dd5a8d15abcc06e7cfa53cd153" id = "r_a731ef4dd5a8d15abcc06e7cfa53cd153" >< td class = "memItemLeft" align = "right" valign = "top" > enum   </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThread.html#a731ef4dd5a8d15abcc06e7cfa53cd153" > Priority</ a > { < br />
   < b > kPLow</ b >
, < b > kPBelowNormal</ b >
, < b > kPNormal</ b >
, < b > kPAboveNormal</ b >
, < br />
   < b > kPRealTime</ b >
< br />
}</ td ></ tr >
< tr class = "separator:a731ef4dd5a8d15abcc06e7cfa53cd153" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "inherit_header pub_types_classUThreadC_3_01void_01_4" >< td colspan = "2" onclick = "javascript:toggleInherit('pub_types_classUThreadC_3_01void_01_4')" >< img src = "closed.png" alt = "-" />   Public Types inherited from < a class = "el" href = "classUThreadC_3_01void_01_4.html" > UThreadC< void > </ a ></ td ></ tr >
< tr class = "memitem:a0ffb19a834ba3271ed3c9f650f119664 inherit pub_types_classUThreadC_3_01void_01_4" id = "r_a0ffb19a834ba3271ed3c9f650f119664" >< td class = "memItemLeft" align = "right" valign = "top" > typedef THREAD_HANDLE  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThreadC_3_01void_01_4.html#a0ffb19a834ba3271ed3c9f650f119664" > Handle</ a ></ td ></ tr >
< tr class = "separator:a0ffb19a834ba3271ed3c9f650f119664 inherit pub_types_classUThreadC_3_01void_01_4" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a14b685cdf9b6529a5e31f0f021c4cfd9 inherit pub_types_classUThreadC_3_01void_01_4" id = "r_a14b685cdf9b6529a5e31f0f021c4cfd9" >< td class = "memItemLeft" align = "right" valign = "top" > typedef void(*  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThreadC_3_01void_01_4.html#a14b685cdf9b6529a5e31f0f021c4cfd9" > Handler</ a > ) ()</ td ></ tr >
< tr class = "separator:a14b685cdf9b6529a5e31f0f021c4cfd9 inherit pub_types_classUThreadC_3_01void_01_4" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a0ffb19a834ba3271ed3c9f650f119664 inherit pub_types_classUThreadC_3_01void_01_4" id = "r_a0ffb19a834ba3271ed3c9f650f119664" >< td class = "memItemLeft" align = "right" valign = "top" > typedef THREAD_HANDLE  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThreadC_3_01void_01_4.html#a0ffb19a834ba3271ed3c9f650f119664" > Handle</ a ></ td ></ tr >
< tr class = "separator:a0ffb19a834ba3271ed3c9f650f119664 inherit pub_types_classUThreadC_3_01void_01_4" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a14b685cdf9b6529a5e31f0f021c4cfd9 inherit pub_types_classUThreadC_3_01void_01_4" id = "r_a14b685cdf9b6529a5e31f0f021c4cfd9" >< td class = "memItemLeft" align = "right" valign = "top" > typedef void(*  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThreadC_3_01void_01_4.html#a14b685cdf9b6529a5e31f0f021c4cfd9" > Handler</ a > ) ()</ td ></ tr >
< tr class = "separator:a14b685cdf9b6529a5e31f0f021c4cfd9 inherit pub_types_classUThreadC_3_01void_01_4" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
</ table >< table class = "memberdecls" >
< tr class = "heading" >< td colspan = "2" >< h2 class = "groupheader" >< a id = "pub-methods" name = "pub-methods" ></ a >
Public Member Functions</ h2 ></ td ></ tr >
< tr class = "memitem:a05a92f95e2a8900f27b09ddf907b97be" id = "r_a05a92f95e2a8900f27b09ddf907b97be" >< td class = "memItemLeft" align = "right" valign = "top" >   </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThread.html#a05a92f95e2a8900f27b09ddf907b97be" > UThread</ a > (< a class = "el" href = "classUThread.html#a731ef4dd5a8d15abcc06e7cfa53cd153" > Priority</ a > priority=kPNormal)</ td ></ tr >
< tr class = "separator:a05a92f95e2a8900f27b09ddf907b97be" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a437580d224111e60cbe2626f0e4cb12e" id = "r_a437580d224111e60cbe2626f0e4cb12e" >< td class = "memItemLeft" align = "right" valign = "top" > virtual  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThread.html#a437580d224111e60cbe2626f0e4cb12e" > ~UThread</ a > ()</ td ></ tr >
< tr class = "separator:a437580d224111e60cbe2626f0e4cb12e" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a051e9adcf24f92b9c8e31acd06bad88c" id = "r_a051e9adcf24f92b9c8e31acd06bad88c" >< td class = "memItemLeft" align = "right" valign = "top" > void  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThread.html#a051e9adcf24f92b9c8e31acd06bad88c" > start</ a > ()</ td ></ tr >
< tr class = "separator:a051e9adcf24f92b9c8e31acd06bad88c" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a8dfefcfd68b453da08ddba9836f35965" id = "r_a8dfefcfd68b453da08ddba9836f35965" >< td class = "memItemLeft" align = "right" valign = "top" > void  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThread.html#a8dfefcfd68b453da08ddba9836f35965" > kill</ a > ()</ td ></ tr >
< tr class = "separator:a8dfefcfd68b453da08ddba9836f35965" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:acf33c0e4b656af76da100e7d4f69ed1d" id = "r_acf33c0e4b656af76da100e7d4f69ed1d" >< td class = "memItemLeft" align = "right" valign = "top" > void  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThread.html#acf33c0e4b656af76da100e7d4f69ed1d" > join</ a > (bool killFirst=false)</ td ></ tr >
< tr class = "separator:acf33c0e4b656af76da100e7d4f69ed1d" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a80418be3a80a01ddd05a863b58787b43" id = "r_a80418be3a80a01ddd05a863b58787b43" >< td class = "memItemLeft" align = "right" valign = "top" > void  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThread.html#a80418be3a80a01ddd05a863b58787b43" > setPriority</ a > (< a class = "el" href = "classUThread.html#a731ef4dd5a8d15abcc06e7cfa53cd153" > Priority</ a > priority)</ td ></ tr >
< tr class = "separator:a80418be3a80a01ddd05a863b58787b43" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:aabcf31acae6ca5b8503ec320acbc11f8" id = "r_aabcf31acae6ca5b8503ec320acbc11f8" >< td class = "memItemLeft" align = "right" valign = "top" > void  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThread.html#aabcf31acae6ca5b8503ec320acbc11f8" > setAffinity</ a > (int cpu=0)</ td ></ tr >
< tr class = "separator:aabcf31acae6ca5b8503ec320acbc11f8" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:ac80eff7d48382fd230141ca286370d33" id = "r_ac80eff7d48382fd230141ca286370d33" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThread.html#ac80eff7d48382fd230141ca286370d33" > isCreating</ a > () const</ td ></ tr >
< tr class = "separator:ac80eff7d48382fd230141ca286370d33" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a38e2b22f0616ed4128312baff9cfeba9" id = "r_a38e2b22f0616ed4128312baff9cfeba9" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThread.html#a38e2b22f0616ed4128312baff9cfeba9" > isRunning</ a > () const</ td ></ tr >
< tr class = "separator:a38e2b22f0616ed4128312baff9cfeba9" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a2c4554ad881c0532239a0930c2ebfe24" id = "r_a2c4554ad881c0532239a0930c2ebfe24" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThread.html#a2c4554ad881c0532239a0930c2ebfe24" > isIdle</ a > () const</ td ></ tr >
< tr class = "separator:a2c4554ad881c0532239a0930c2ebfe24" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a3a0d0de0f78eab72512941ccd048477b" id = "r_a3a0d0de0f78eab72512941ccd048477b" >< td class = "memItemLeft" align = "right" valign = "top" > bool  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThread.html#a3a0d0de0f78eab72512941ccd048477b" > isKilled</ a > () const</ td ></ tr >
< tr class = "separator:a3a0d0de0f78eab72512941ccd048477b" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a4f404f03046fa89dced06514f040b2af" id = "r_a4f404f03046fa89dced06514f040b2af" >< td class = "memItemLeft" align = "right" valign = "top" > Handle  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThread.html#a4f404f03046fa89dced06514f040b2af" > getThreadHandle</ a > () const</ td ></ tr >
< tr class = "separator:a4f404f03046fa89dced06514f040b2af" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a40e8ea82c06ed20bb6266a6a42a8f51f" id = "r_a40e8ea82c06ed20bb6266a6a42a8f51f" >< td class = "memItemLeft" align = "right" valign = "top" > unsigned long  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThread.html#a40e8ea82c06ed20bb6266a6a42a8f51f" > getThreadId</ a > () const</ td ></ tr >
< tr class = "separator:a40e8ea82c06ed20bb6266a6a42a8f51f" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "inherit_header pub_methods_classUThreadC_3_01void_01_4" >< td colspan = "2" onclick = "javascript:toggleInherit('pub_methods_classUThreadC_3_01void_01_4')" >< img src = "closed.png" alt = "-" />   Public Member Functions inherited from < a class = "el" href = "classUThreadC_3_01void_01_4.html" > UThreadC< void > </ a ></ td ></ tr >
< tr class = "memitem:a724a5919ea1f1e74b69a9073d532e400 inherit pub_methods_classUThreadC_3_01void_01_4" id = "r_a724a5919ea1f1e74b69a9073d532e400" >< td class = "memItemLeft" align = "right" valign = "top" > int  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThreadC_3_01void_01_4.html#a724a5919ea1f1e74b69a9073d532e400" > Create</ a > (Handle *const & H=0, const bool & CreateDetached=false, const unsigned int & StackSize=0, const bool & CancelEnable=false, const bool & CancelAsync=false) const</ td ></ tr >
< tr class = "separator:a724a5919ea1f1e74b69a9073d532e400 inherit pub_methods_classUThreadC_3_01void_01_4" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a5af5c76be4b8e6b746a77146a3d7021a inherit pub_methods_classUThreadC_3_01void_01_4" id = "r_a5af5c76be4b8e6b746a77146a3d7021a" >< td class = "memItemLeft" align = "right" valign = "top" > int  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThreadC_3_01void_01_4.html#a5af5c76be4b8e6b746a77146a3d7021a" > Create</ a > (unsigned long & ThreadId, Handle *const & H=0, const bool & CreateDetached=false, const unsigned int & StackSize=0, const bool & CancelEnable=false, const bool & CancelAsync=false) const</ td ></ tr >
< tr class = "separator:a5af5c76be4b8e6b746a77146a3d7021a inherit pub_methods_classUThreadC_3_01void_01_4" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a724a5919ea1f1e74b69a9073d532e400 inherit pub_methods_classUThreadC_3_01void_01_4" id = "r_a724a5919ea1f1e74b69a9073d532e400" >< td class = "memItemLeft" align = "right" valign = "top" > int  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThreadC_3_01void_01_4.html#a724a5919ea1f1e74b69a9073d532e400" > Create</ a > (Handle *const & H=0, const bool & CreateDetached=false, const unsigned int & StackSize=0, const bool & CancelEnable=false, const bool & CancelAsync=false) const</ td ></ tr >
< tr class = "separator:a724a5919ea1f1e74b69a9073d532e400 inherit pub_methods_classUThreadC_3_01void_01_4" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a5af5c76be4b8e6b746a77146a3d7021a inherit pub_methods_classUThreadC_3_01void_01_4" id = "r_a5af5c76be4b8e6b746a77146a3d7021a" >< td class = "memItemLeft" align = "right" valign = "top" > int  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThreadC_3_01void_01_4.html#a5af5c76be4b8e6b746a77146a3d7021a" > Create</ a > (unsigned long & ThreadId, Handle *const & H=0, const bool & CreateDetached=false, const unsigned int & StackSize=0, const bool & CancelEnable=false, const bool & CancelAsync=false) const</ td ></ tr >
< tr class = "separator:a5af5c76be4b8e6b746a77146a3d7021a inherit pub_methods_classUThreadC_3_01void_01_4" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
</ table >< table class = "memberdecls" >
< tr class = "heading" >< td colspan = "2" >< h2 class = "groupheader" >< a id = "pub-static-methods" name = "pub-static-methods" ></ a >
Static Public Member Functions</ h2 ></ td ></ tr >
< tr class = "memitem:a6fa5e2358a86c5185371fd14305021aa" id = "r_a6fa5e2358a86c5185371fd14305021aa" >< td class = "memItemLeft" align = "right" valign = "top" > static unsigned long  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThread.html#a6fa5e2358a86c5185371fd14305021aa" > currentThreadId</ a > ()</ td ></ tr >
< tr class = "separator:a6fa5e2358a86c5185371fd14305021aa" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "inherit_header pub_static_methods_classUThreadC_3_01void_01_4" >< td colspan = "2" onclick = "javascript:toggleInherit('pub_static_methods_classUThreadC_3_01void_01_4')" >< img src = "closed.png" alt = "-" />   Static Public Member Functions inherited from < a class = "el" href = "classUThreadC_3_01void_01_4.html" > UThreadC< void > </ a ></ td ></ tr >
< tr class = "memitem:a17eb99ec0990246c0c7161e6bec84c74 inherit pub_static_methods_classUThreadC_3_01void_01_4" id = "r_a17eb99ec0990246c0c7161e6bec84c74" >< td class = "memItemLeft" align = "right" valign = "top" > static int  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThreadC_3_01void_01_4.html#a17eb99ec0990246c0c7161e6bec84c74" > Create</ a > (const Handler & Function, Handle *const & H=0, const bool & CreateDetached=false, const unsigned int & StackSize=0, const bool & CancelEnable=false, const bool & CancelAsync=false)</ td ></ tr >
< tr class = "separator:a17eb99ec0990246c0c7161e6bec84c74 inherit pub_static_methods_classUThreadC_3_01void_01_4" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a1584a3a80d86181ff66784cf0f8c2392 inherit pub_static_methods_classUThreadC_3_01void_01_4" id = "r_a1584a3a80d86181ff66784cf0f8c2392" >< td class = "memItemLeft" align = "right" valign = "top" > static int  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThreadC_3_01void_01_4.html#a1584a3a80d86181ff66784cf0f8c2392" > Join</ a > (Handle H)</ td ></ tr >
< tr class = "separator:a1584a3a80d86181ff66784cf0f8c2392 inherit pub_static_methods_classUThreadC_3_01void_01_4" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:aec2af3352538bb8e45916c468e6960dc inherit pub_static_methods_classUThreadC_3_01void_01_4" id = "r_aec2af3352538bb8e45916c468e6960dc" >< td class = "memItemLeft" align = "right" valign = "top" > static int  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThreadC_3_01void_01_4.html#aec2af3352538bb8e45916c468e6960dc" > Kill</ a > (Handle H)</ td ></ tr >
< tr class = "separator:aec2af3352538bb8e45916c468e6960dc inherit pub_static_methods_classUThreadC_3_01void_01_4" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a591f5bfcea463cfaa2249bbcdd3ab522 inherit pub_static_methods_classUThreadC_3_01void_01_4" id = "r_a591f5bfcea463cfaa2249bbcdd3ab522" >< td class = "memItemLeft" align = "right" valign = "top" > static int  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThreadC_3_01void_01_4.html#a591f5bfcea463cfaa2249bbcdd3ab522" > Detach</ a > (Handle H)</ td ></ tr >
< tr class = "separator:a591f5bfcea463cfaa2249bbcdd3ab522 inherit pub_static_methods_classUThreadC_3_01void_01_4" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a17eb99ec0990246c0c7161e6bec84c74 inherit pub_static_methods_classUThreadC_3_01void_01_4" id = "r_a17eb99ec0990246c0c7161e6bec84c74" >< td class = "memItemLeft" align = "right" valign = "top" > static int  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThreadC_3_01void_01_4.html#a17eb99ec0990246c0c7161e6bec84c74" > Create</ a > (const Handler & Function, Handle *const & H=0, const bool & CreateDetached=false, const unsigned int & StackSize=0, const bool & CancelEnable=false, const bool & CancelAsync=false)</ td ></ tr >
< tr class = "separator:a17eb99ec0990246c0c7161e6bec84c74 inherit pub_static_methods_classUThreadC_3_01void_01_4" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a1d704989d9a19f552ac0387c143cad95 inherit pub_static_methods_classUThreadC_3_01void_01_4" id = "r_a1d704989d9a19f552ac0387c143cad95" >< td class = "memItemLeft" align = "right" valign = "top" > static int  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThreadC_3_01void_01_4.html#a1d704989d9a19f552ac0387c143cad95" > Join</ a > (const Handle & H)</ td ></ tr >
< tr class = "separator:a1d704989d9a19f552ac0387c143cad95 inherit pub_static_methods_classUThreadC_3_01void_01_4" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a4a83aaa66db8ee6f07482130091690e3 inherit pub_static_methods_classUThreadC_3_01void_01_4" id = "r_a4a83aaa66db8ee6f07482130091690e3" >< td class = "memItemLeft" align = "right" valign = "top" > static int  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThreadC_3_01void_01_4.html#a4a83aaa66db8ee6f07482130091690e3" > Kill</ a > (const Handle & H)</ td ></ tr >
< tr class = "separator:a4a83aaa66db8ee6f07482130091690e3 inherit pub_static_methods_classUThreadC_3_01void_01_4" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a094155ec7163e19480ed2181ef8032ed inherit pub_static_methods_classUThreadC_3_01void_01_4" id = "r_a094155ec7163e19480ed2181ef8032ed" >< td class = "memItemLeft" align = "right" valign = "top" > static int  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThreadC_3_01void_01_4.html#a094155ec7163e19480ed2181ef8032ed" > Detach</ a > (const Handle & H)</ td ></ tr >
< tr class = "separator:a094155ec7163e19480ed2181ef8032ed inherit pub_static_methods_classUThreadC_3_01void_01_4" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
</ table >< table class = "memberdecls" >
< tr class = "heading" >< td colspan = "2" >< h2 class = "groupheader" >< a id = "inherited" name = "inherited" ></ a >
Additional Inherited Members</ h2 ></ td ></ tr >
< tr class = "inherit_header pro_static_methods_classUThreadC_3_01void_01_4" >< td colspan = "2" onclick = "javascript:toggleInherit('pro_static_methods_classUThreadC_3_01void_01_4')" >< img src = "closed.png" alt = "-" />   Static Protected Member Functions inherited from < a class = "el" href = "classUThreadC_3_01void_01_4.html" > UThreadC< void > </ a ></ td ></ tr >
< tr class = "memitem:afc1715cfa1d5ae88f57ba2fe983bb9e5 inherit pro_static_methods_classUThreadC_3_01void_01_4" id = "r_afc1715cfa1d5ae88f57ba2fe983bb9e5" >< td class = "memItemLeft" align = "right" valign = "top" > static void  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThreadC_3_01void_01_4.html#afc1715cfa1d5ae88f57ba2fe983bb9e5" > Exit</ a > ()</ td ></ tr >
< tr class = "separator:afc1715cfa1d5ae88f57ba2fe983bb9e5 inherit pro_static_methods_classUThreadC_3_01void_01_4" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a5dc3a0223030adcc0c6e3ef829efc824 inherit pro_static_methods_classUThreadC_3_01void_01_4" id = "r_a5dc3a0223030adcc0c6e3ef829efc824" >< td class = "memItemLeft" align = "right" valign = "top" > static void  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThreadC_3_01void_01_4.html#a5dc3a0223030adcc0c6e3ef829efc824" > TestCancel</ a > ()</ td ></ tr >
< tr class = "separator:a5dc3a0223030adcc0c6e3ef829efc824 inherit pro_static_methods_classUThreadC_3_01void_01_4" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a33cd70cb0291ebd0a95016e89b4d5b6c inherit pro_static_methods_classUThreadC_3_01void_01_4" id = "r_a33cd70cb0291ebd0a95016e89b4d5b6c" >< td class = "memItemLeft" align = "right" valign = "top" > static Handle  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThreadC_3_01void_01_4.html#a33cd70cb0291ebd0a95016e89b4d5b6c" > Self</ a > ()</ td ></ tr >
< tr class = "separator:a33cd70cb0291ebd0a95016e89b4d5b6c inherit pro_static_methods_classUThreadC_3_01void_01_4" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:afc1715cfa1d5ae88f57ba2fe983bb9e5 inherit pro_static_methods_classUThreadC_3_01void_01_4" id = "r_afc1715cfa1d5ae88f57ba2fe983bb9e5" >< td class = "memItemLeft" align = "right" valign = "top" > static void  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThreadC_3_01void_01_4.html#afc1715cfa1d5ae88f57ba2fe983bb9e5" > Exit</ a > ()</ td ></ tr >
< tr class = "separator:afc1715cfa1d5ae88f57ba2fe983bb9e5 inherit pro_static_methods_classUThreadC_3_01void_01_4" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:a5dc3a0223030adcc0c6e3ef829efc824 inherit pro_static_methods_classUThreadC_3_01void_01_4" id = "r_a5dc3a0223030adcc0c6e3ef829efc824" >< td class = "memItemLeft" align = "right" valign = "top" > static void  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThreadC_3_01void_01_4.html#a5dc3a0223030adcc0c6e3ef829efc824" > TestCancel</ a > ()</ td ></ tr >
< tr class = "separator:a5dc3a0223030adcc0c6e3ef829efc824 inherit pro_static_methods_classUThreadC_3_01void_01_4" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
< tr class = "memitem:afed28b5b5bb00d4addbb0cd7f2ce0ce2 inherit pro_static_methods_classUThreadC_3_01void_01_4" id = "r_afed28b5b5bb00d4addbb0cd7f2ce0ce2" >< td class = "memItemLeft" align = "right" valign = "top" > static int  </ td >< td class = "memItemRight" valign = "bottom" >< a class = "el" href = "classUThreadC_3_01void_01_4.html#afed28b5b5bb00d4addbb0cd7f2ce0ce2" > Self</ a > ()</ td ></ tr >
< tr class = "separator:afed28b5b5bb00d4addbb0cd7f2ce0ce2 inherit pro_static_methods_classUThreadC_3_01void_01_4" >< td class = "memSeparator" colspan = "2" >   </ td ></ tr >
</ table >
< a name = "details" id = "details" ></ a >< h2 class = "groupheader" > Detailed Description</ h2 >
< div class = "textblock" >< p > The class < a class = "el" href = "classUThread.html" > UThread</ a > is an abstract class for creating thread objects. A < a class = "el" href = "classUThread.html" > UThread</ a > provides methods to create threads as an object-style fashion.</ p >
< p > For most of inherited classes, only mainLoop() needs to be implemented, then only < a class = "el" href = "classUThread.html#a051e9adcf24f92b9c8e31acd06bad88c" > start()</ a > needs to be called from the outside. The main loop is called until the thread itself calls < a class = "el" href = "classUThread.html#a8dfefcfd68b453da08ddba9836f35965" > kill()</ a > or another thread calls < a class = "el" href = "classUThread.html#a8dfefcfd68b453da08ddba9836f35965" > kill()</ a > or < a class = "el" href = "classUThread.html#acf33c0e4b656af76da100e7d4f69ed1d" > join()</ a > (with parameter to true) on this thread. Unlike < a class = "el" href = "classUThread.html#a8dfefcfd68b453da08ddba9836f35965" > kill()</ a > , < a class = "el" href = "classUThread.html#acf33c0e4b656af76da100e7d4f69ed1d" > join()</ a > is a blocking call: the calling thread will wait until this thread has finished, thus < a class = "el" href = "classUThread.html#acf33c0e4b656af76da100e7d4f69ed1d" > join()</ a > must not be called inside the mainLoop().</ p >
< p > If inside the mainLoop(), at some time, the thread needs to wait on a mutex/semaphore (like for the acquisition of a resource), the function mainLoopKill() should be implemented to release the mutex/semaphore when the thread is killed, to avoid a deadlock. The function killCleanup() is called after the thread's state is set to kSKilled. After the mutex/semaphore is released in killCleanup(), on wake up, the thread can know if it needs to stop by calling < a class = "el" href = "classUThread.html#a3a0d0de0f78eab72512941ccd048477b" > isKilled()</ a > .</ p >
< p > To do an initialization process (executed by the worker thread) just one time before entering the mainLoop(), mainLoopBegin() can be implemented.</ p >
< p > Example: </ p >< div class = "fragment" >< div class = "line" >< span class = "preprocessor" > #include " utilite/UThread.h" </ span ></ div >
< div class = "line" >< span class = "keyword" > class </ span > SimpleThread : < span class = "keyword" > public</ span > < a class = "code hl_class" href = "classUThread.html" > UThread</ a ></ div >
< div class = "line" > {</ div >
< div class = "line" >< span class = "keyword" > public</ span > :</ div >
< div class = "line" > SimpleThread() {}</ div >
< div class = "line" > < span class = "keyword" > virtual</ span > ~SimpleThread() {</ div >
< div class = "line" > < span class = "comment" > // The calling thread will wait until this thread has finished.</ span ></ div >
< div class = "line" > this-> join(< span class = "keyword" > true</ span > );</ div >
< div class = "line" > }</ div >
< div class = "line" > </ div >
< div class = "line" >< span class = "keyword" > protected</ span > :</ div >
< div class = "line" > < span class = "keyword" > virtual</ span > < span class = "keywordtype" > void</ span > mainLoop() {</ div >
< div class = "line" > < span class = "comment" > // Do some works...</ span ></ div >
< div class = "line" > </ div >
< div class = "line" > < span class = "comment" > // This will stop the thread, otherwise the mainLoop() is recalled.</ span ></ div >
< div class = "line" > this-> kill();</ div >
< div class = "line" > }</ div >
< div class = "line" > };</ div >
< div class = "line" > </ div >
< div class = "line" >< span class = "keywordtype" > int</ span > main(< span class = "keywordtype" > int</ span > argc, < span class = "keywordtype" > char</ span > * argv[])</ div >
< div class = "line" > {</ div >
< div class = "line" > SimpleThread t;</ div >
< div class = "line" > t.start();</ div >
< div class = "line" > t.join(); < span class = "comment" > // Wait until the thread has finished.</ span ></ div >
< div class = "line" > < span class = "keywordflow" > return</ span > 0;</ div >
< div class = "line" > }</ div >
< div class = "ttc" id = "aclassUThread_html" >< div class = "ttname" >< a href = "classUThread.html" > UThread</ a ></ div >< div class = "ttdef" >< b > Definition</ b > < a href = "UThread_8h_source.html#l00086" > UThread.h:87</ a ></ div ></ div >
</ div > <!-- fragment --> < dl class = "section see" >< dt > See also</ dt >< dd >< a class = "el" href = "classUThread.html#a051e9adcf24f92b9c8e31acd06bad88c" > start()</ a > </ dd >
< dd >
< a class = "el" href = "classUThread.html#a8dfefcfd68b453da08ddba9836f35965" > kill()</ a > </ dd >
< dd >
< a class = "el" href = "classUThread.html#acf33c0e4b656af76da100e7d4f69ed1d" > join()</ a > </ dd >
< dd >
mainLoopBegin() </ dd >
< dd >
mainLoopKill() </ dd >
< dd >
mainLoop() </ dd ></ dl >
< p class = "definition" > Definition at line < a class = "el" href = "UThread_8h_source.html#l00086" > 86</ a > of file < a class = "el" href = "UThread_8h_source.html" > UThread.h</ a > .</ p >
</ div >< h2 class = "groupheader" > Member Enumeration Documentation</ h2 >
< a id = "a731ef4dd5a8d15abcc06e7cfa53cd153" name = "a731ef4dd5a8d15abcc06e7cfa53cd153" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a731ef4dd5a8d15abcc06e7cfa53cd153" > ◆  </ a ></ span > Priority</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > enum < a class = "el" href = "classUThread.html#a731ef4dd5a8d15abcc06e7cfa53cd153" > UThread::Priority</ a ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Enum of priorities : kPLow, kPBelowNormal, kPNormal, kPAboveNormal, kPRealTime. </ p >
< p class = "definition" > Definition at line < a class = "el" href = "UThread_8h_source.html#l00092" > 92</ a > of file < a class = "el" href = "UThread_8h_source.html" > UThread.h</ a > .</ p >
</ div >
</ div >
< h2 class = "groupheader" > Constructor & Destructor Documentation</ h2 >
< a id = "a05a92f95e2a8900f27b09ddf907b97be" name = "a05a92f95e2a8900f27b09ddf907b97be" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a05a92f95e2a8900f27b09ddf907b97be" > ◆  </ a ></ span > UThread()</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > UThread::UThread </ td >
< td > (</ td >
< td class = "paramtype" >< a class = "el" href = "classUThread.html#a731ef4dd5a8d15abcc06e7cfa53cd153" > Priority</ a >   </ td >
< td class = "paramname" >< em > priority</ em > = < code > kPNormal</ code ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > The constructor. </ p >< dl class = "section see" >< dt > See also</ dt >< dd >< a class = "el" href = "classUThread.html#a731ef4dd5a8d15abcc06e7cfa53cd153" > Priority</ a > </ dd ></ dl >
< dl class = "params" >< dt > Parameters</ dt >< dd >
< table class = "params" >
< tr >< td class = "paramname" > priority</ td >< td > the thread priority </ td ></ tr >
</ table >
</ dd >
</ dl >
</ div >
</ div >
< a id = "a437580d224111e60cbe2626f0e4cb12e" name = "a437580d224111e60cbe2626f0e4cb12e" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a437580d224111e60cbe2626f0e4cb12e" > ◆  </ a ></ span > ~UThread()</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > virtual UThread::~UThread </ 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 > The destructor. Inherited classes must call join(true) inside their destructor to avoid memory leaks where the underlying c-thread is still running.</ p >
< p > Note: not safe to delete a thread while other threads are joining it. </ p >
</ div >
</ div >
< h2 class = "groupheader" > Member Function Documentation</ h2 >
< a id = "a6fa5e2358a86c5185371fd14305021aa" name = "a6fa5e2358a86c5185371fd14305021aa" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a6fa5e2358a86c5185371fd14305021aa" > ◆  </ a ></ span > currentThreadId()</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > static unsigned long UThread::currentThreadId </ td >
< td > (</ td >
< td class = "paramname" ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ td >
< td class = "mlabels-right" >
< span class = "mlabels" >< span class = "mlabel" > inline</ span >< span class = "mlabel" > static</ span ></ span > </ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p class = "definition" > Definition at line < a class = "el" href = "UThread_8h_source.html#l00096" > 96</ a > of file < a class = "el" href = "UThread_8h_source.html" > UThread.h</ a > .</ p >
</ div >
</ div >
< a id = "a051e9adcf24f92b9c8e31acd06bad88c" name = "a051e9adcf24f92b9c8e31acd06bad88c" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a051e9adcf24f92b9c8e31acd06bad88c" > ◆  </ a ></ span > start()</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void UThread::start </ td >
< td > (</ td >
< td class = "paramname" ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Start the thread. Once the thread is started, subsequent calls to < a class = "el" href = "classUThread.html#a051e9adcf24f92b9c8e31acd06bad88c" > start()</ a > are ignored until the thread is killed. </ p >< dl class = "section see" >< dt > See also</ dt >< dd >< a class = "el" href = "classUThread.html#a8dfefcfd68b453da08ddba9836f35965" > kill()</ a > </ dd ></ dl >
</ div >
</ div >
< a id = "a8dfefcfd68b453da08ddba9836f35965" name = "a8dfefcfd68b453da08ddba9836f35965" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a8dfefcfd68b453da08ddba9836f35965" > ◆  </ a ></ span > kill()</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void UThread::kill </ td >
< td > (</ td >
< td class = "paramname" ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Kill the thread. This functions does nothing if the thread is not started or is killed.</ p >
< p > Note : not a blocking call </ p >
</ div >
</ div >
< a id = "acf33c0e4b656af76da100e7d4f69ed1d" name = "acf33c0e4b656af76da100e7d4f69ed1d" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#acf33c0e4b656af76da100e7d4f69ed1d" > ◆  </ a ></ span > join()</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void UThread::join </ td >
< td > (</ td >
< td class = "paramtype" > bool  </ td >
< td class = "paramname" >< em > killFirst</ em > = < code > false</ code ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > The caller thread will wait until the thread has finished.</ p >
< p > Note : blocking call </ p >< dl class = "params" >< dt > Parameters</ dt >< dd >
< table class = "params" >
< tr >< td class = "paramname" > killFirst</ td >< td > if you want < a class = "el" href = "classUThread.html#a8dfefcfd68b453da08ddba9836f35965" > kill()</ a > to be called before joining (default false), otherwise not. </ td ></ tr >
</ table >
</ dd >
</ dl >
</ div >
</ div >
< a id = "a80418be3a80a01ddd05a863b58787b43" name = "a80418be3a80a01ddd05a863b58787b43" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a80418be3a80a01ddd05a863b58787b43" > ◆  </ a ></ span > setPriority()</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void UThread::setPriority </ td >
< td > (</ td >
< td class = "paramtype" >< a class = "el" href = "classUThread.html#a731ef4dd5a8d15abcc06e7cfa53cd153" > Priority</ a >   </ td >
< td class = "paramname" >< em > priority</ em ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Set the thread priority. </ p >< dl class = "params" >< dt > Parameters</ dt >< dd >
< table class = "params" >
< tr >< td class = "paramname" > priority</ td >< td > the priority </ td ></ tr >
</ table >
</ dd >
</ dl >
</ div >
</ div >
< a id = "aabcf31acae6ca5b8503ec320acbc11f8" name = "aabcf31acae6ca5b8503ec320acbc11f8" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#aabcf31acae6ca5b8503ec320acbc11f8" > ◆  </ a ></ span > setAffinity()</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > void UThread::setAffinity </ td >
< td > (</ td >
< td class = "paramtype" > int  </ td >
< td class = "paramname" >< em > cpu</ em > = < code > 0</ code ></ td >< td > )</ td >
< td ></ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p > Set the thread affinity. This is applied during start of the thread.</ p >
< p > MAC OS X : < a href = "http://developer.apple.com/library/mac/#releasenotes/Performance/RN-AffinityAPI/_index.html" > http://developer.apple.com/library/mac/#releasenotes/Performance/RN-AffinityAPI/_index.html</ a > . </ p >< dl class = "params" >< dt > Parameters</ dt >< dd >
< table class = "params" >
< tr >< td class = "paramname" > cpu</ td >< td > the cpu id (start at 1), 0 means no affinity (default). </ td ></ tr >
</ table >
</ dd >
</ dl >
</ div >
</ div >
< a id = "ac80eff7d48382fd230141ca286370d33" name = "ac80eff7d48382fd230141ca286370d33" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#ac80eff7d48382fd230141ca286370d33" > ◆  </ a ></ span > isCreating()</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > bool UThread::isCreating </ td >
< td > (</ td >
< td class = "paramname" ></ td >< td > )</ td >
< td > const</ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< dl class = "section return" >< dt > Returns</ dt >< dd > if the state of the thread is kSCreating (after < a class = "el" href = "classUThread.html#a051e9adcf24f92b9c8e31acd06bad88c" > start()</ a > is called but before entering the mainLoop()). </ dd ></ dl >
</ div >
</ div >
< a id = "a38e2b22f0616ed4128312baff9cfeba9" name = "a38e2b22f0616ed4128312baff9cfeba9" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a38e2b22f0616ed4128312baff9cfeba9" > ◆  </ a ></ span > isRunning()</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > bool UThread::isRunning </ td >
< td > (</ td >
< td class = "paramname" ></ td >< td > )</ td >
< td > const</ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< dl class = "section return" >< dt > Returns</ dt >< dd > if the state of the thread is kSRunning (it is executing the mainLoop()) or kSCreating. </ dd ></ dl >
</ div >
</ div >
< a id = "a2c4554ad881c0532239a0930c2ebfe24" name = "a2c4554ad881c0532239a0930c2ebfe24" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a2c4554ad881c0532239a0930c2ebfe24" > ◆  </ a ></ span > isIdle()</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > bool UThread::isIdle </ td >
< td > (</ td >
< td class = "paramname" ></ td >< td > )</ td >
< td > const</ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< dl class = "section return" >< dt > Returns</ dt >< dd > if the state of the thread is kSIdle (before < a class = "el" href = "classUThread.html#a051e9adcf24f92b9c8e31acd06bad88c" > start()</ a > is called and after the thread is totally killed (or after join(true))). </ dd ></ dl >
</ div >
</ div >
< a id = "a3a0d0de0f78eab72512941ccd048477b" name = "a3a0d0de0f78eab72512941ccd048477b" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a3a0d0de0f78eab72512941ccd048477b" > ◆  </ a ></ span > isKilled()</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "memname" >
< tr >
< td class = "memname" > bool UThread::isKilled </ td >
< td > (</ td >
< td class = "paramname" ></ td >< td > )</ td >
< td > const</ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< dl class = "section return" >< dt > Returns</ dt >< dd > if the state of the thread is kSKilled (after < a class = "el" href = "classUThread.html#a8dfefcfd68b453da08ddba9836f35965" > kill()</ a > is called and before the thread is totally killed). </ dd ></ dl >
</ div >
</ div >
< a id = "a4f404f03046fa89dced06514f040b2af" name = "a4f404f03046fa89dced06514f040b2af" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a4f404f03046fa89dced06514f040b2af" > ◆  </ a ></ span > getThreadHandle()</ h2 >
< div class = "memitem" >
< div class = "memproto" >
< table class = "mlabels" >
< tr >
< td class = "mlabels-left" >
< table class = "memname" >
< tr >
< td class = "memname" > Handle UThread::getThreadHandle </ 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" > inline</ span ></ span > </ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p class = "definition" > Definition at line < a class = "el" href = "UThread_8h_source.html#l00171" > 171</ a > of file < a class = "el" href = "UThread_8h_source.html" > UThread.h</ a > .</ p >
</ div >
</ div >
< a id = "a40e8ea82c06ed20bb6266a6a42a8f51f" name = "a40e8ea82c06ed20bb6266a6a42a8f51f" ></ a >
< h2 class = "memtitle" >< span class = "permalink" >< a href = "#a40e8ea82c06ed20bb6266a6a42a8f51f" > ◆  </ 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" > unsigned long UThread::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" > inline</ span ></ span > </ td >
</ tr >
</ table >
</ div >< div class = "memdoc" >
< p class = "definition" > Definition at line < a class = "el" href = "UThread_8h_source.html#l00172" > 172</ a > of file < a class = "el" href = "UThread_8h_source.html" > UThread.h</ a > .</ p >
</ div >
</ div >
< hr /> The documentation for this class was generated from the following file:< ul >
< li > utilite/include/rtabmap/utilite/< a class = "el" href = "UThread_8h_source.html" > UThread.h</ a ></ li >
</ ul >
</ div > <!-- contents -->
</ div > <!-- doc-content -->
<!-- start footer part -->
< div id = "nav-path" class = "navpath" > <!-- id is needed for treeview function! -->
< ul >
< li class = "navelem" >< a class = "el" href = "classUThread.html" > UThread</ a ></ li >
< li class = "footer" > Generated by < a href = "https://www.doxygen.org/index.html" >< img class = "footer" src = "doxygen.svg" width = "104" height = "31" alt = "doxygen" /></ a > 1.9.8 </ li >
</ ul >
</ div >
</ body >
</ html >