Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > ed376d6842ea322c25405e7c23b3bc12 > files > 392

libcommoncpp-devel-1.8.0-5.1mdv2010.1.i586.rpm

<!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"/>
<title>GNU CommonC++: ost::Thread Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespaceost.html">ost</a>::<a class="el" href="classost_1_1_thread.html">Thread</a>
  </div>
</div>
<div class="contents">
<h1>ost::Thread Class Reference</h1><!-- doxytag: class="ost::Thread" -->
<p>Every thread of execution in an application is created by instantiating an object of a class derived from the <a class="el" href="classost_1_1_thread.html" title="Every thread of execution in an application is created by instantiating an object...">Thread</a> class.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="thread_8h_source.html">thread.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for ost::Thread:</div>
<div class="dynsection">
 <div class="center">
  <img src="classost_1_1_thread.png" usemap="#ost::Thread_map" alt=""/>
  <map id="ost::Thread_map" name="ost::Thread_map">
<area href="classost_1_1_posix_thread.html" alt="ost::PosixThread" shape="rect" coords="0,56,116,80"/>
<area href="classost_1_1_serial_service.html" alt="ost::SerialService" shape="rect" coords="126,56,242,80"/>
<area href="classost_1_1_socket_service.html" alt="ost::SocketService" shape="rect" coords="252,56,368,80"/>
<area href="classost_1_1_t_c_p_session.html" alt="ost::TCPSession" shape="rect" coords="378,56,494,80"/>
<area href="classost_1_1_thread_queue.html" alt="ost::ThreadQueue" shape="rect" coords="504,56,620,80"/>
<area href="classost_1_1_t_t_y_session.html" alt="ost::TTYSession" shape="rect" coords="630,56,746,80"/>
<area href="classost_1_1_unix_session.html" alt="ost::UnixSession" shape="rect" coords="756,56,872,80"/>
</map>
 </div>
</div>

<p><a href="classost_1_1_thread-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#ab9538e839c06104af2974b77d2a5674d">Throw</a> { <a class="el" href="classost_1_1_thread.html#ab9538e839c06104af2974b77d2a5674da1b058025329425c90f383d124ee605e5">throwNothing</a>, 
<a class="el" href="classost_1_1_thread.html#ab9538e839c06104af2974b77d2a5674daea5957cd08cfecf17f366352bcf9ad80">throwObject</a>, 
<a class="el" href="classost_1_1_thread.html#ab9538e839c06104af2974b77d2a5674da8e51a6870e65238764becffff92d7f54">throwException</a>
 }</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>How to raise error. </p>
 <a href="classost_1_1_thread.html#ab9538e839c06104af2974b77d2a5674d">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a24f333b09607b7c48a97e05865ada69b">Cancel</a> { <br/>
&nbsp;&nbsp;<a class="el" href="classost_1_1_thread.html#a24f333b09607b7c48a97e05865ada69babbf14157c17311ec31f0967032ecb357">cancelInitial</a> = 0, 
<a class="el" href="classost_1_1_thread.html#a24f333b09607b7c48a97e05865ada69bab02b8cd8d899a693e8cbb86082f4ef16">cancelDeferred</a> = 1, 
<a class="el" href="classost_1_1_thread.html#a24f333b09607b7c48a97e05865ada69ba57f820ea4f7a326c27cc504a213e167d">cancelImmediate</a>, 
<a class="el" href="classost_1_1_thread.html#a24f333b09607b7c48a97e05865ada69bae07cc9f6d3d7333c8cce543a8bb58215">cancelDisabled</a>, 
<br/>
&nbsp;&nbsp;<a class="el" href="classost_1_1_thread.html#a24f333b09607b7c48a97e05865ada69baa194b63cafc5387684afe7943fe3b5f0">cancelManual</a>, 
<a class="el" href="classost_1_1_thread.html#a24f333b09607b7c48a97e05865ada69badf753e6d700f194c1b8f695a9bd67554">cancelDefault</a> = cancelDeferred
<br/>
 }</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>How work cancellation. </p>
 <a href="classost_1_1_thread.html#a24f333b09607b7c48a97e05865ada69b">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#aff7bd364ce645eac95affbf74f1a7087">Suspend</a> { <a class="el" href="classost_1_1_thread.html#aff7bd364ce645eac95affbf74f1a7087a27f2f61f4bc18b64e9c25f73bb008a38">suspendEnable</a>, 
<a class="el" href="classost_1_1_thread.html#aff7bd364ce645eac95affbf74f1a7087a0e9f14f0e69d8c12c36a46d108a5074b">suspendDisable</a>
 }</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>How work suspend. </p>
 <a href="classost_1_1_thread.html#aff7bd364ce645eac95affbf74f1a7087">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="classost_1_1_thread.html#ab9538e839c06104af2974b77d2a5674d">ost::Thread::Throw</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a511f08b9f1aef08b4f02e2ad225960ab">Throw</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">How to raise error.  <a href="#a511f08b9f1aef08b4f02e2ad225960ab"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="classost_1_1_thread.html#a24f333b09607b7c48a97e05865ada69b">ost::Thread::Cancel</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a0d876c60edcf92d3d96121aacea441d0">Cancel</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">How work cancellation.  <a href="#a0d876c60edcf92d3d96121aacea441d0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef enum <a class="el" href="classost_1_1_thread.html#aff7bd364ce645eac95affbf74f1a7087">ost::Thread::Suspend</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a81069ba4a0bf16a0aa9f076aa725f0c1">Suspend</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">How work suspend.  <a href="#a81069ba4a0bf16a0aa9f076aa725f0c1"></a><br/></td></tr>
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a72470c1b00d098e74162284e248c0435">Thread</a> (bool isMain)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This is actually a special constructor that is used to create a thread "object" for the current execution context when that context is not created via an instance of a derived <a class="el" href="classost_1_1_thread.html" title="Every thread of execution in an application is created by instantiating an object...">Thread</a> object itself.  <a href="#a72470c1b00d098e74162284e248c0435"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a082ea94f104219969a2d75becc749af6">Thread</a> (int pri=0, size_t stack=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">When a thread object is contructed, a new thread of execution context is created.  <a href="#a082ea94f104219969a2d75becc749af6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a0ba7f4211aabb5a278c546d0fae81f55">Thread</a> (const <a class="el" href="classost_1_1_thread.html">Thread</a> &amp;th)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A thread of execution can also be specified by cloning an existing thread.  <a href="#a0ba7f4211aabb5a278c546d0fae81f55"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#ad363397f26006af68fa9315c9bff8589">~Thread</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The thread destructor should clear up any resources that have been allocated by the thread.  <a href="#ad363397f26006af68fa9315c9bff8589"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a2ef198d7aefb93cf9de4fcc6b66c27a2">start</a> (<a class="el" href="classost_1_1_semaphore.html">Semaphore</a> *start=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">When a new thread is created, it does not begin immediate execution.  <a href="#a2ef198d7aefb93cf9de4fcc6b66c27a2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#ac30778f0fffd9dd952fd73cb541cc70b">detach</a> (<a class="el" href="classost_1_1_semaphore.html">Semaphore</a> *start=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Start a new thread as "detached".  <a href="#ac30778f0fffd9dd952fd73cb541cc70b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classost_1_1_thread.html">Thread</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#aac5bc230c3bad5c837baa9e6d01f4c24">getParent</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the pointer to the <a class="el" href="classost_1_1_thread.html" title="Every thread of execution in an application is created by instantiating an object...">Thread</a> class which created the current thread object.  <a href="#aac5bc230c3bad5c837baa9e6d01f4c24"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a5f1b650c1f3b71e458adfbd86b3acb83">suspend</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Suspends execution of the selected thread.  <a href="#a5f1b650c1f3b71e458adfbd86b3acb83"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a0861f734ad77b1ba517fce302215e41e">resume</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resumes execution of the selected thread.  <a href="#a0861f734ad77b1ba517fce302215e41e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classost_1_1_thread.html#a24f333b09607b7c48a97e05865ada69b">Cancel</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a3524521d80bcc0562fb59a28ce5d62a4">getCancel</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Used to retrieve the cancellation mode in effect for the selected thread.  <a href="#a3524521d80bcc0562fb59a28ce5d62a4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#aa04a06a086dffad7ffc67dba4ea431ab">isRunning</a> (void) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Verifies if the thread is still running or has already been terminated but not yet deleted.  <a href="#aa04a06a086dffad7ffc67dba4ea431ab"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a1bbbe1d6bc6dea6bea48cdabe2c7da20">isDetached</a> (void) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check if this thread is detached.  <a href="#a1bbbe1d6bc6dea6bea48cdabe2c7da20"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a1e6d355ea0d9b0b023f3fc2aa91a25e8">join</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Blocking call which unlocks when thread terminates.  <a href="#a1e6d355ea0d9b0b023f3fc2aa91a25e8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a69ae124edf7e7989db0f911b847cacae">isThread</a> (void) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Tests to see if the current execution context is the same as the specified thread object.  <a href="#a69ae124edf7e7989db0f911b847cacae"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="thread_8h.html#a3f0d0226a694bf1e508e1b1c758e6ae6">cctid_t</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a3947a150139cf226626f47166ff92286">getId</a> (void) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get system thread numeric identifier.  <a href="#a3947a150139cf226626f47166ff92286"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a6b578a4a82d61060d1b17109caddc1a5">getName</a> (void) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the name string for this thread, to use in debug messages.  <a href="#a6b578a4a82d61060d1b17109caddc1a5"></a><br/></td></tr>
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classost_1_1_thread.html">Thread</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#aaad41a9f7962bdc3058a429df48246fd">get</a> (void)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#accd29b724539d63a8495d954f9f56c72">setStack</a> (size_t size=0)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set base stack limit before manual stack sizes have effect.  <a href="#accd29b724539d63a8495d954f9f56c72"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a663d960e8599194f3b25169915c22fb6">sleep</a> (<a class="el" href="thread_8h.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a> msec)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A thread-safe sleep call.  <a href="#a663d960e8599194f3b25169915c22fb6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a3f4a4f9872ed8f80a591e6b020ecf5d7">yield</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Yields the current thread's CPU time slice to allow another thread to begin immediate execution.  <a href="#a3f4a4f9872ed8f80a591e6b020ecf5d7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classost_1_1_thread.html#ab9538e839c06104af2974b77d2a5674d">Throw</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a0272b6a8de586ee5ee2464bbdb030392">getException</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get exception mode of the current thread.  <a href="#a0272b6a8de586ee5ee2464bbdb030392"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#ae9f30b27ca1322ccc3325ba9ca5157fa">setException</a> (<a class="el" href="classost_1_1_thread.html#ab9538e839c06104af2974b77d2a5674d">Throw</a> mode)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set exception mode of the current thread.  <a href="#ae9f30b27ca1322ccc3325ba9ca5157fa"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classost_1_1_thread.html#a24f333b09607b7c48a97e05865ada69b">Cancel</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a599880181a0aeaef8a0ddedeeceddb9a">enterCancel</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This is used to help build wrapper functions in libraries around system calls that should behave as cancellation points but don't.  <a href="#a599880181a0aeaef8a0ddedeeceddb9a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#abcad222419e4106ac21ce12605eb4fe7">exitCancel</a> (<a class="el" href="classost_1_1_thread.html#a24f333b09607b7c48a97e05865ada69b">Cancel</a> cancel)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This is used to restore a cancel block.  <a href="#abcad222419e4106ac21ce12605eb4fe7"></a><br/></td></tr>
<tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#ab6f72653183c4db0dfd6b254ddbf072e">setName</a> (const char *text)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the name of the current thread.  <a href="#ab6f72653183c4db0dfd6b254ddbf072e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#add7d339d94b8a1ed2b2b0324a95b7e74">run</a> (void)=0</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">All threads execute by deriving the Run method of <a class="el" href="classost_1_1_thread.html" title="Every thread of execution in an application is created by instantiating an object...">Thread</a>.  <a href="#add7d339d94b8a1ed2b2b0324a95b7e74"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a6fb521eb3d23c51925472a3fe0abf327">final</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A thread that is self terminating, either by invoking <a class="el" href="classost_1_1_thread.html#acd315d7c877b346970680d739da3e994" title="Used to properly exit from a Thread derived run() or initial() method.">exit()</a> or leaving it's <a class="el" href="classost_1_1_thread.html#add7d339d94b8a1ed2b2b0324a95b7e74" title="All threads execute by deriving the Run method of Thread.">run()</a>, will have this method called.  <a href="#a6fb521eb3d23c51925472a3fe0abf327"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a300c229e76725eeddc69867f7ecea91f">initial</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The initial method is called by a newly created thread when it starts execution.  <a href="#a300c229e76725eeddc69867f7ecea91f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#ab73c94e3ca46cb24f4246e71fff73026">getExtended</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Since <a class="el" href="classost_1_1_thread.html#aac5bc230c3bad5c837baa9e6d01f4c24" title="Gets the pointer to the Thread class which created the current thread object.">getParent()</a> and <a class="el" href="namespaceost.html#a99c7f7d02b00922b0f5ee62fc3bb75fd">getThread()</a> only refer to an object of the <a class="el" href="classost_1_1_thread.html" title="Every thread of execution in an application is created by instantiating an object...">Thread</a> "base" type, this virtual method can be replaced in a derived class with something that returns data specific to the derived class that can still be accessed through the pointer returned by <a class="el" href="classost_1_1_thread.html#aac5bc230c3bad5c837baa9e6d01f4c24" title="Gets the pointer to the Thread class which created the current thread object.">getParent()</a> and <a class="el" href="namespaceost.html#a99c7f7d02b00922b0f5ee62fc3bb75fd">getThread()</a>.  <a href="#ab73c94e3ca46cb24f4246e71fff73026"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a390827ad98d3402dd84ee9f128bcd564">notify</a> (<a class="el" href="classost_1_1_thread.html">Thread</a> *)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">When a thread terminates, it now sends a notification message to the parent thread which created it.  <a href="#a390827ad98d3402dd84ee9f128bcd564"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#acd315d7c877b346970680d739da3e994">exit</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Used to properly exit from a <a class="el" href="classost_1_1_thread.html" title="Every thread of execution in an application is created by instantiating an object...">Thread</a> derived <a class="el" href="classost_1_1_thread.html#add7d339d94b8a1ed2b2b0324a95b7e74" title="All threads execute by deriving the Run method of Thread.">run()</a> or <a class="el" href="classost_1_1_thread.html#a300c229e76725eeddc69867f7ecea91f" title="The initial method is called by a newly created thread when it starts execution.">initial()</a> method.  <a href="#acd315d7c877b346970680d739da3e994"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a1cda4748073c4d55e2d0504e7c9b09cc">sync</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Used to wait for a join or cancel, in place of explicit exit.  <a href="#a1cda4748073c4d55e2d0504e7c9b09cc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#af8afe7a3330b69dff685415aae14657c">testCancel</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">test a cancellation point for deferred thread cancellation.  <a href="#af8afe7a3330b69dff685415aae14657c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a4bff373a83b90f6f44d1519ef893e35b">setCancel</a> (<a class="el" href="classost_1_1_thread.html#a24f333b09607b7c48a97e05865ada69b">Cancel</a> mode)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets thread cancellation mode.  <a href="#a4bff373a83b90f6f44d1519ef893e35b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#ad226f8bca85bf68ce71d90baca6434d6">setSuspend</a> (<a class="el" href="classost_1_1_thread.html#aff7bd364ce645eac95affbf74f1a7087">Suspend</a> mode)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the thread's ability to be suspended from execution.  <a href="#ad226f8bca85bf68ce71d90baca6434d6"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#ae71c94c24733ed82f9b74c034744d002">terminate</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Used by another thread to terminate the current thread.  <a href="#ae71c94c24733ed82f9b74c034744d002"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a5e574c2c5f388277527c9257524dd654">clrParent</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">clear parent thread relationship.  <a href="#a5e574c2c5f388277527c9257524dd654"></a><br/></td></tr>
<tr><td colspan="2"><h2>Friends</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#abc1a729c4204bc85f58c47042f429acb">PosixThread</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a9b6e94561c96e07e8f2dd776bbc19396">DummyThread</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#abbf97e2c58c760acb67b9db3a7ba11db">Cancellation</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#ae156bb5074cfe5c3a729890e0ded952f">postream_type</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#af08013a89bf19b835ba6f75a60f870ed">Slog</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#ae3c1cdb20d70b22a5c0bf395614eefff">ThreadImpl</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#a2742c471d2abe8712368ccff8d534702">operator++</a> (<a class="el" href="classost_1_1_thread.html">Thread</a> &amp;th)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Signal the semaphore that the specified thread is waiting for before beginning execution.  <a href="#a2742c471d2abe8712368ccff8d534702"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classost_1_1_thread.html#aa797f8e5a1ea5b857251f98f0d50614e">operator--</a> (<a class="el" href="classost_1_1_thread.html">Thread</a> &amp;th)</td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Every thread of execution in an application is created by instantiating an object of a class derived from the <a class="el" href="classost_1_1_thread.html" title="Every thread of execution in an application is created by instantiating an object...">Thread</a> class. </p>
<p>Classes derived from <a class="el" href="classost_1_1_thread.html" title="Every thread of execution in an application is created by instantiating an object...">Thread</a> must implement the <a class="el" href="classost_1_1_thread.html#add7d339d94b8a1ed2b2b0324a95b7e74" title="All threads execute by deriving the Run method of Thread.">run()</a> method, which specifies the code of the thread. The base <a class="el" href="classost_1_1_thread.html" title="Every thread of execution in an application is created by instantiating an object...">Thread</a> class supports encapsulation of the generic threading methods implemented on various target operating systems. This includes the ability to start and stop threads in a synchronized and controllable manner, the ability to specify thread execution priority, and thread specific "system call" wrappers, such as for sleep and yield. A thread exception is thrown if the thread cannot be created. Threading was the first part of Common C++ I wrote, back when it was still the APE library. My goal for Common C++ threading has been to make threading as natural and easy to use in C++ application development as threading is in Java. With this said, one does not need to use threading at all to take advantage of Common C++. However, all Common C++ classes are designed at least to be thread-aware/thread-safe as appropriate and necessary.</p>
<p>Common C++ threading is currently built either from the Posix "pthread" library or using the win32 SDK. In that the Posix "pthread" draft has gone through many revisions, and many system implementations are only marginally compliant, and even then usually in different ways, I wrote a large series of autoconf macros found in ost_pthread.m4 which handle the task of identifying which pthread features and capabilities your target platform supports. In the process I learned much about what autoconf can and cannot do for you..</p>
<p>Currently the GNU Portable <a class="el" href="classost_1_1_thread.html" title="Every thread of execution in an application is created by instantiating an object...">Thread</a> library (GNU pth) is not directly supported in Common C++. While GNU "Pth" doesn't offer direct native threading support or benefit from SMP hardware, many of the design advantages of threading can be gained from it's use, and the Pth pthread "emulation" library should be usable with Common C++. In the future, Common C++ will directly support Pth, as well as OS/2 and BeOS native threading API's.</p>
<p>Common C++ itself defines a fairly "neutral" threading model that is not tied to any specific API such as pthread, win32, etc. This neutral thread model is contained in a series of classes which handle threading and synchronization and which may be used together to build reliable threaded applications.</p>
<p>Common C++ defines application specific threads as objects which are derived from the Common C++ "Thread" base class. At minimum the "Run" method must be implemented, and this method essentially is the "thread", for it is executed within the execution context of the thread, and when the Run method terminates the thread is assumed to have terminated.</p>
<p>Common C++ allows one to specify the running priority of a newly created thread relative to the "parent" thread which is the thread that is executing when the constructor is called. Since most newer C++ implementations do not allow one to call virtual constructors or virtual methods from constructors, the thread must be "started" after the constructor returns. This is done either by defining a "starting" semaphore object that one or more newly created thread objects can wait upon, or by invoking an explicit "start" member function.</p>
<p>Threads can be "suspended" and "resumed". As this behavior is not defined in the Posix "pthread" specification, it is often emulated through signals. Typically SIGUSR1 will be used for this purpose in Common C++ applications, depending in the target platform. On Linux, since threads are indeed processes, SIGSTP and SIGCONT can be used. On solaris, the Solaris thread library supports suspend and resume directly.</p>
<p>Threads can be canceled. Not all platforms support the concept of externally cancelable threads. On those platforms and API implementations that do not, threads are typically canceled through the action of a signal handler.</p>
<p>As noted earlier, threads are considered running until the "Run" method returns, or until a cancellation request is made. Common C++ threads can control how they respond to cancellation, using setCancellation(). <a class="el" href="classost_1_1_cancellation.html" title="A class to automatically set the thread cancellation mode of a member function.">Cancellation</a> requests can be ignored, set to occur only when a cancellation "point" has been reached in the code, or occur immediately. Threads can also exit by returning from Run() or by invoking the Exit() method.</p>
<p>Generally it is a good practice to initialize any resources the thread may require within the constructor of your derived thread class, and to purge or restore any allocated resources in the destructor. In most cases, the destructor will be executed after the thread has terminated, and hence will execute within the context of the thread that requested a join rather than in the context of the thread that is being terminated. Most destructors in derived thread classes should first call Terminate() to make sure the thread has stopped running before releasing resources.</p>
<p>A Common C++ thread is normally canceled by deleting the thread object. The process of deletion invokes the thread's destructor, and the destructor will then perform a "join" against the thread using the Terminate() function. This behavior is not always desirable since the thread may block itself from cancellation and block the current "delete" operation from completing. One can alternately invoke Terminate() directly before deleting a thread object.</p>
<p>When a given Common C++ thread exits on it's own through it's Run() method, a "Final" method will be called. This Final method will be called while the thread is "detached". If a thread object is constructed through a "new" operator, it's final method can be used to "self delete" when done, and allows an independent thread to construct and remove itself autonomously.</p>
<p>A special global function, <a class="el" href="namespaceost.html#a99c7f7d02b00922b0f5ee62fc3bb75fd">getThread()</a>, is provided to identify the thread object that represents the current execution context you are running under. This is sometimes needed to deliver signals to the correct thread. Since all thread manipulation should be done through the Common C++ (base) thread class itself, this provides the same functionality as things like "pthread_self" for Common C++.</p>
<p>All Common C++ threads have an exception "mode" which determines their behavior when an exception is thrown by another Common C++ class. Extensions to Common C++ should respect the current exception mode and use <a class="el" href="classost_1_1_thread.html#a0272b6a8de586ee5ee2464bbdb030392" title="Get exception mode of the current thread.">getException()</a> to determine what to do when they are about to throw an object. The default exception mode (defined in the <a class="el" href="classost_1_1_thread.html#a72470c1b00d098e74162284e248c0435" title="This is actually a special constructor that is used to create a thread &quot;object&quot;...">Thread()</a> constructor) is throwObject, which causes a pointer to an instance of the class where the error occured to be thrown. Other exception modes are throwException, which causes a class-specific exception class to be thrown, and throwNothing, which causes errors to be ignored.</p>
<p>As an example, you could try to call the <a class="el" href="classost_1_1_socket.html" title="The Socket is used as the base for all Internet protocol services under Common C++...">Socket</a> class with an invalid address that the system could not bind to. This would cause an object of type <a class="el" href="classost_1_1_socket.html" title="The Socket is used as the base for all Internet protocol services under Common C++...">Socket</a> * to be thrown by default, as the default exception mode is throwObject. If you call setException(throwException) before the bad call to the <a class="el" href="classost_1_1_socket.html" title="The Socket is used as the base for all Internet protocol services under Common C++...">Socket</a> constructor, an object of type <a class="el" href="classost_1_1_sock_exception.html">SockException</a> (the exception class for class <a class="el" href="classost_1_1_socket.html" title="The Socket is used as the base for all Internet protocol services under Common C++...">Socket</a>) will be thrown instead.</p>
<p>To determine what exception class is thrown by a given Common C++ class when the exception mode is set to throwException, search the source files for the class you are interested in for a class which inherits directly or indirectly from class <a class="el" href="classost_1_1_exception.html" title="Mainline exception handler, this is the root for all Common C++ exceptions and assures...">Exception</a>. This is the exception class which would be thrown when the exception mode is set to throwException.</p>
<p>The advantage of using throwException versus throwObject is that more information is available to the programmer from the thrown object. All class-specific exceptions inherit from class <a class="el" href="classost_1_1_exception.html" title="Mainline exception handler, this is the root for all Common C++ exceptions and assures...">Exception</a>, which provides a getString() method which can be called to get a human-readable error string.</p>
<p>Common C++ threads are often aggregated into other classes to provide services that are "managed" from or operate within the context of a thread, even within the Common C++ framework itself. A good example of this is the <a class="el" href="classost_1_1_t_c_p_session.html" title="The TCP session is used to primarily to represent a client connection that can be...">TCPSession</a> class, which essentially is a combination of a TCP client connection and a separate thread the user can define by deriving a class with a Run() method to handle the connected service. This aggregation logically connects the successful allocation of a given resource with the construction of a thread to manage and perform operations for said resource.</p>
<p>Threads are also used in "service pools". In Common C++, a service pool is one or more threads that are used to manage a set of resources. While Common C++ does not provide a direct "pool" class, it does provide a model for their implementation, usually by constructing an array of thread "service" objects, each of which can then be assigned the next new instance of a given resource in turn or algorithmically.</p>
<p>Threads have signal handlers associated with them. Several signal types are "predefined" and have special meaning. All signal handlers are defined as virtual member functions of the <a class="el" href="classost_1_1_thread.html" title="Every thread of execution in an application is created by instantiating an object...">Thread</a> class which are called when a specific signal is received for a given thread. The "SIGPIPE" event is defined as a "Disconnect" event since it's normally associated with a socket disconnecting or broken fifo. The Hangup() method is associated with the SIGHUP signal. All other signals are handled through the more generic Signal().</p>
<p>Incidently, unlike Posix, the win32 API has no concept of signals, and certainly no means to define or deliver signals on a per-thread basis. For this reason, no signal handling is supported or emulated in the win32 implementation of Common C++ at this time.</p>
<p>In addition to <a class="el" href="classost_1_1_t_c_p_stream.html" title="TCP streams are used to represent TCP client connections to a server by TCP protocol...">TCPStream</a>, there is a <a class="el" href="classost_1_1_t_c_p_session.html" title="The TCP session is used to primarily to represent a client connection that can be...">TCPSession</a> class which combines a thread with a <a class="el" href="classost_1_1_t_c_p_stream.html" title="TCP streams are used to represent TCP client connections to a server by TCP protocol...">TCPStream</a> object. The assumption made by <a class="el" href="classost_1_1_t_c_p_session.html" title="The TCP session is used to primarily to represent a client connection that can be...">TCPSession</a> is that one will service each TCP connection with a separate thread, and this makes sense for systems where extended connections may be maintained and complex protocols are being used over TCP.</p>
<dl class="author"><dt><b>Author:</b></dt><dd>David Sugar &lt;<a href="mailto:dyfet@ostel.com">dyfet@ostel.com</a>&gt; base class used to derive all threads of execution. </dd></dl>
<dl><dt><b>Examples: </b></dt><dd>
<p><a class="el" href="bug1_8cpp-example.html#_a0">bug1.cpp</a>, <a class="el" href="bug2_8cpp-example.html#_a0">bug2.cpp</a>, <a class="el" href="tcpservice_8cpp-example.html#_a16">tcpservice.cpp</a>, <a class="el" href="tcpstr1_8cpp-example.html#_a0">tcpstr1.cpp</a>, <a class="el" href="thread1_8cpp-example.html#_a0">thread1.cpp</a>, and <a class="el" href="thread2_8cpp-example.html#_a0">thread2.cpp</a>.</p>
</dd>
</dl><hr/><h2>Member Typedef Documentation</h2>
<a class="anchor" id="a0d876c60edcf92d3d96121aacea441d0"></a><!-- doxytag: member="ost::Thread::Cancel" ref="a0d876c60edcf92d3d96121aacea441d0" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef enum <a class="el" href="classost_1_1_thread.html#a24f333b09607b7c48a97e05865ada69b">ost::Thread::Cancel</a>  <a class="el" href="classost_1_1_thread.html#a24f333b09607b7c48a97e05865ada69b">ost::Thread::Cancel</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>How work cancellation. </p>

</div>
</div>
<a class="anchor" id="a81069ba4a0bf16a0aa9f076aa725f0c1"></a><!-- doxytag: member="ost::Thread::Suspend" ref="a81069ba4a0bf16a0aa9f076aa725f0c1" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef enum <a class="el" href="classost_1_1_thread.html#aff7bd364ce645eac95affbf74f1a7087">ost::Thread::Suspend</a>  <a class="el" href="classost_1_1_thread.html#aff7bd364ce645eac95affbf74f1a7087">ost::Thread::Suspend</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>How work suspend. </p>

</div>
</div>
<a class="anchor" id="a511f08b9f1aef08b4f02e2ad225960ab"></a><!-- doxytag: member="ost::Thread::Throw" ref="a511f08b9f1aef08b4f02e2ad225960ab" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef enum <a class="el" href="classost_1_1_thread.html#ab9538e839c06104af2974b77d2a5674d">ost::Thread::Throw</a>  <a class="el" href="classost_1_1_thread.html#ab9538e839c06104af2974b77d2a5674d">ost::Thread::Throw</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>How to raise error. </p>

</div>
</div>
<hr/><h2>Member Enumeration Documentation</h2>
<a class="anchor" id="a24f333b09607b7c48a97e05865ada69b"></a><!-- doxytag: member="ost::Thread::Cancel" ref="a24f333b09607b7c48a97e05865ada69b" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classost_1_1_thread.html#a24f333b09607b7c48a97e05865ada69b">ost::Thread::Cancel</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>How work cancellation. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="a24f333b09607b7c48a97e05865ada69babbf14157c17311ec31f0967032ecb357"></a><!-- doxytag: member="cancelInitial" ref="a24f333b09607b7c48a97e05865ada69babbf14157c17311ec31f0967032ecb357" args="" -->cancelInitial</em>&nbsp;</td><td>
<p>used internally, do not use </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a24f333b09607b7c48a97e05865ada69bab02b8cd8d899a693e8cbb86082f4ef16"></a><!-- doxytag: member="cancelDeferred" ref="a24f333b09607b7c48a97e05865ada69bab02b8cd8d899a693e8cbb86082f4ef16" args="" -->cancelDeferred</em>&nbsp;</td><td>
<p>exit thread on cancellation pointsuch as yield </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a24f333b09607b7c48a97e05865ada69ba57f820ea4f7a326c27cc504a213e167d"></a><!-- doxytag: member="cancelImmediate" ref="a24f333b09607b7c48a97e05865ada69ba57f820ea4f7a326c27cc504a213e167d" args="" -->cancelImmediate</em>&nbsp;</td><td>
<p>exit befor cancellation </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a24f333b09607b7c48a97e05865ada69bae07cc9f6d3d7333c8cce543a8bb58215"></a><!-- doxytag: member="cancelDisabled" ref="a24f333b09607b7c48a97e05865ada69bae07cc9f6d3d7333c8cce543a8bb58215" args="" -->cancelDisabled</em>&nbsp;</td><td>
<p>ignore cancellation </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a24f333b09607b7c48a97e05865ada69baa194b63cafc5387684afe7943fe3b5f0"></a><!-- doxytag: member="cancelManual" ref="a24f333b09607b7c48a97e05865ada69baa194b63cafc5387684afe7943fe3b5f0" args="" -->cancelManual</em>&nbsp;</td><td>
<p>unimplemented (working in progress) </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a24f333b09607b7c48a97e05865ada69badf753e6d700f194c1b8f695a9bd67554"></a><!-- doxytag: member="cancelDefault" ref="a24f333b09607b7c48a97e05865ada69badf753e6d700f194c1b8f695a9bd67554" args="" -->cancelDefault</em>&nbsp;</td><td>
<p>default you should use this for compatibility instead of deferred </p>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
<a class="anchor" id="aff7bd364ce645eac95affbf74f1a7087"></a><!-- doxytag: member="ost::Thread::Suspend" ref="aff7bd364ce645eac95affbf74f1a7087" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classost_1_1_thread.html#aff7bd364ce645eac95affbf74f1a7087">ost::Thread::Suspend</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>How work suspend. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="aff7bd364ce645eac95affbf74f1a7087a27f2f61f4bc18b64e9c25f73bb008a38"></a><!-- doxytag: member="suspendEnable" ref="aff7bd364ce645eac95affbf74f1a7087a27f2f61f4bc18b64e9c25f73bb008a38" args="" -->suspendEnable</em>&nbsp;</td><td>
<p>suspend enabled </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="aff7bd364ce645eac95affbf74f1a7087a0e9f14f0e69d8c12c36a46d108a5074b"></a><!-- doxytag: member="suspendDisable" ref="aff7bd364ce645eac95affbf74f1a7087a0e9f14f0e69d8c12c36a46d108a5074b" args="" -->suspendDisable</em>&nbsp;</td><td>
<p>suspend disabled, Suspend do nothing </p>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
<a class="anchor" id="ab9538e839c06104af2974b77d2a5674d"></a><!-- doxytag: member="ost::Thread::Throw" ref="ab9538e839c06104af2974b77d2a5674d" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classost_1_1_thread.html#ab9538e839c06104af2974b77d2a5674d">ost::Thread::Throw</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>How to raise error. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="ab9538e839c06104af2974b77d2a5674da1b058025329425c90f383d124ee605e5"></a><!-- doxytag: member="throwNothing" ref="ab9538e839c06104af2974b77d2a5674da1b058025329425c90f383d124ee605e5" args="" -->throwNothing</em>&nbsp;</td><td>
<p>continue without throwing error </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ab9538e839c06104af2974b77d2a5674daea5957cd08cfecf17f366352bcf9ad80"></a><!-- doxytag: member="throwObject" ref="ab9538e839c06104af2974b77d2a5674daea5957cd08cfecf17f366352bcf9ad80" args="" -->throwObject</em>&nbsp;</td><td>
<p>throw object that cause error (throw this) </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ab9538e839c06104af2974b77d2a5674da8e51a6870e65238764becffff92d7f54"></a><!-- doxytag: member="throwException" ref="ab9538e839c06104af2974b77d2a5674da8e51a6870e65238764becffff92d7f54" args="" -->throwException</em>&nbsp;</td><td>
<p>throw an object relative to error </p>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a72470c1b00d098e74162284e248c0435"></a><!-- doxytag: member="ost::Thread::Thread" ref="a72470c1b00d098e74162284e248c0435" args="(bool isMain)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ost::Thread::Thread </td>
          <td>(</td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>isMain</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This is actually a special constructor that is used to create a thread "object" for the current execution context when that context is not created via an instance of a derived <a class="el" href="classost_1_1_thread.html" title="Every thread of execution in an application is created by instantiating an object...">Thread</a> object itself. </p>
<p>This constructor does not support First.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>isMain</em>&nbsp;</td><td>bool used if the main "thread" of the application. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a082ea94f104219969a2d75becc749af6"></a><!-- doxytag: member="ost::Thread::Thread" ref="a082ea94f104219969a2d75becc749af6" args="(int pri=0, size_t stack=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ost::Thread::Thread </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>pri</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>stack</em> = <code>0</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>When a thread object is contructed, a new thread of execution context is created. </p>
<p>This constructor allows basic properties of that context (thread priority, stack space, etc) to be defined. The starting condition is also specified for whether the thread is to wait on a semaphore before begining execution or wait until it's start method is called.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pri</em>&nbsp;</td><td>thread base priority relative to it's parent. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>stack</em>&nbsp;</td><td>space as needed in some implementations. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a0ba7f4211aabb5a278c546d0fae81f55"></a><!-- doxytag: member="ost::Thread::Thread" ref="a0ba7f4211aabb5a278c546d0fae81f55" args="(const Thread &amp;th)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ost::Thread::Thread </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classost_1_1_thread.html">Thread</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>th</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A thread of execution can also be specified by cloning an existing thread. </p>
<p>The existing thread's properties (cancel mode, priority, etc), are also duplicated.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>th</em>&nbsp;</td><td>currently executing thread object to clone. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ad363397f26006af68fa9315c9bff8589"></a><!-- doxytag: member="ost::Thread::~Thread" ref="ad363397f26006af68fa9315c9bff8589" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual ost::Thread::~Thread </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The thread destructor should clear up any resources that have been allocated by the thread. </p>
<p>The desctructor of a derived thread should begin with Terminate() and is presumed to then execute within the context of the thread causing terminaton. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a5e574c2c5f388277527c9257524dd654"></a><!-- doxytag: member="ost::Thread::clrParent" ref="a5e574c2c5f388277527c9257524dd654" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ost::Thread::clrParent </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>clear parent thread relationship. </p>

</div>
</div>
<a class="anchor" id="ac30778f0fffd9dd952fd73cb541cc70b"></a><!-- doxytag: member="ost::Thread::detach" ref="ac30778f0fffd9dd952fd73cb541cc70b" args="(Semaphore *start=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ost::Thread::detach </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classost_1_1_semaphore.html">Semaphore</a> *&nbsp;</td>
          <td class="paramname"> <em>start</em> = <code>0</code></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Start a new thread as "detached". </p>
<p>This is an alternative <a class="el" href="classost_1_1_thread.html#a2ef198d7aefb93cf9de4fcc6b66c27a2" title="When a new thread is created, it does not begin immediate execution.">start()</a> method that resolves some issues with later glibc implimentations which incorrectly impliment self-detach.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>error code if execution fails. </dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>start</em>&nbsp;</td><td>optional starting semaphore to alternately use. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="thread2_8cpp-example.html#a2">thread2.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="a599880181a0aeaef8a0ddedeeceddb9a"></a><!-- doxytag: member="ost::Thread::enterCancel" ref="a599880181a0aeaef8a0ddedeeceddb9a" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classost_1_1_thread.html#a24f333b09607b7c48a97e05865ada69b">Cancel</a> ost::Thread::enterCancel </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This is used to help build wrapper functions in libraries around system calls that should behave as cancellation points but don't. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>saved cancel type. </dd></dl>

</div>
</div>
<a class="anchor" id="acd315d7c877b346970680d739da3e994"></a><!-- doxytag: member="ost::Thread::exit" ref="acd315d7c877b346970680d739da3e994" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ost::Thread::exit </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Used to properly exit from a <a class="el" href="classost_1_1_thread.html" title="Every thread of execution in an application is created by instantiating an object...">Thread</a> derived <a class="el" href="classost_1_1_thread.html#add7d339d94b8a1ed2b2b0324a95b7e74" title="All threads execute by deriving the Run method of Thread.">run()</a> or <a class="el" href="classost_1_1_thread.html#a300c229e76725eeddc69867f7ecea91f" title="The initial method is called by a newly created thread when it starts execution.">initial()</a> method. </p>
<p>Terminates execution of the current thread and calls the derived classes <a class="el" href="classost_1_1_thread.html#a6fb521eb3d23c51925472a3fe0abf327" title="A thread that is self terminating, either by invoking exit() or leaving it&#39;s...">final()</a> method. </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="bug2_8cpp-example.html#a1">bug2.cpp</a>, and <a class="el" href="tcpservice_8cpp-example.html#a18">tcpservice.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="abcad222419e4106ac21ce12605eb4fe7"></a><!-- doxytag: member="ost::Thread::exitCancel" ref="abcad222419e4106ac21ce12605eb4fe7" args="(Cancel cancel)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void ost::Thread::exitCancel </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classost_1_1_thread.html#a24f333b09607b7c48a97e05865ada69b">Cancel</a>&nbsp;</td>
          <td class="paramname"> <em>cancel</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This is used to restore a cancel block. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>cancel</em>&nbsp;</td><td>type that was saved. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a6fb521eb3d23c51925472a3fe0abf327"></a><!-- doxytag: member="ost::Thread::final" ref="a6fb521eb3d23c51925472a3fe0abf327" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void ost::Thread::final </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A thread that is self terminating, either by invoking <a class="el" href="classost_1_1_thread.html#acd315d7c877b346970680d739da3e994" title="Used to properly exit from a Thread derived run() or initial() method.">exit()</a> or leaving it's <a class="el" href="classost_1_1_thread.html#add7d339d94b8a1ed2b2b0324a95b7e74" title="All threads execute by deriving the Run method of Thread.">run()</a>, will have this method called. </p>
<p>It can be used to self delete the current object assuming the object was created with new on the heap rather than stack local, hence one may often see final defined as "delete this" in a derived thread class. A final method, while running, cannot be terminated or cancelled by another thread. Final is called for all cancellation type (even immediate).</p>
<p>You can safe delete thread ("delete this") class on final, but you should exit ASAP (or do not try to call CommonC++ methods...)</p>
<dl class="note"><dt><b>Note:</b></dt><dd>A thread cannot delete its own context or join itself. To make a thread that is a self running object that self-deletes, one has to detach the thread by using <a class="el" href="classost_1_1_thread.html#ac30778f0fffd9dd952fd73cb541cc70b" title="Start a new thread as &quot;detached&quot;.">detach()</a> instead of <a class="el" href="classost_1_1_thread.html#a2ef198d7aefb93cf9de4fcc6b66c27a2" title="When a new thread is created, it does not begin immediate execution.">start()</a>.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classost_1_1_thread.html#acd315d7c877b346970680d739da3e994" title="Used to properly exit from a Thread derived run() or initial() method.">exit</a> </dd>
<dd>
<a class="el" href="classost_1_1_thread.html#add7d339d94b8a1ed2b2b0324a95b7e74" title="All threads execute by deriving the Run method of Thread.">run</a> </dd></dl>

<p>Reimplemented in <a class="el" href="classost_1_1_thread_queue.html#a73e81c6abad4dd4758ea95171f67a42b">ost::ThreadQueue</a>.</p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="tcpthread_8cpp-example.html#a10">tcpthread.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="aaad41a9f7962bdc3058a429df48246fd"></a><!-- doxytag: member="ost::Thread::get" ref="aaad41a9f7962bdc3058a429df48246fd" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classost_1_1_thread.html">Thread</a>* ost::Thread::get </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Referenced by <a class="el" href="thread_8h_source.html#l01900">ost::getThread()</a>.</p>

</div>
</div>
<a class="anchor" id="a3524521d80bcc0562fb59a28ce5d62a4"></a><!-- doxytag: member="ost::Thread::getCancel" ref="a3524521d80bcc0562fb59a28ce5d62a4" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classost_1_1_thread.html#a24f333b09607b7c48a97e05865ada69b">Cancel</a> ost::Thread::getCancel </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Used to retrieve the cancellation mode in effect for the selected thread. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>cancellation mode constant. </dd></dl>

</div>
</div>
<a class="anchor" id="a0272b6a8de586ee5ee2464bbdb030392"></a><!-- doxytag: member="ost::Thread::getException" ref="a0272b6a8de586ee5ee2464bbdb030392" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classost_1_1_thread.html#ab9538e839c06104af2974b77d2a5674d">Throw</a> ost::Thread::getException </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get exception mode of the current thread. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>exception mode. </dd></dl>

</div>
</div>
<a class="anchor" id="ab73c94e3ca46cb24f4246e71fff73026"></a><!-- doxytag: member="ost::Thread::getExtended" ref="ab73c94e3ca46cb24f4246e71fff73026" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void* ost::Thread::getExtended </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Since <a class="el" href="classost_1_1_thread.html#aac5bc230c3bad5c837baa9e6d01f4c24" title="Gets the pointer to the Thread class which created the current thread object.">getParent()</a> and <a class="el" href="namespaceost.html#a99c7f7d02b00922b0f5ee62fc3bb75fd">getThread()</a> only refer to an object of the <a class="el" href="classost_1_1_thread.html" title="Every thread of execution in an application is created by instantiating an object...">Thread</a> "base" type, this virtual method can be replaced in a derived class with something that returns data specific to the derived class that can still be accessed through the pointer returned by <a class="el" href="classost_1_1_thread.html#aac5bc230c3bad5c837baa9e6d01f4c24" title="Gets the pointer to the Thread class which created the current thread object.">getParent()</a> and <a class="el" href="namespaceost.html#a99c7f7d02b00922b0f5ee62fc3bb75fd">getThread()</a>. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>pointer to derived class specific data. </dd></dl>

</div>
</div>
<a class="anchor" id="a3947a150139cf226626f47166ff92286"></a><!-- doxytag: member="ost::Thread::getId" ref="a3947a150139cf226626f47166ff92286" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="thread_8h.html#a3f0d0226a694bf1e508e1b1c758e6ae6">cctid_t</a> ost::Thread::getId </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get system thread numeric identifier. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>numeric identifier of this thread. </dd></dl>

</div>
</div>
<a class="anchor" id="a6b578a4a82d61060d1b17109caddc1a5"></a><!-- doxytag: member="ost::Thread::getName" ref="a6b578a4a82d61060d1b17109caddc1a5" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* ost::Thread::getName </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the name string for this thread, to use in debug messages. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>debug name. </dd></dl>

</div>
</div>
<a class="anchor" id="aac5bc230c3bad5c837baa9e6d01f4c24"></a><!-- doxytag: member="ost::Thread::getParent" ref="aac5bc230c3bad5c837baa9e6d01f4c24" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classost_1_1_thread.html">Thread</a>* ost::Thread::getParent </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gets the pointer to the <a class="el" href="classost_1_1_thread.html" title="Every thread of execution in an application is created by instantiating an object...">Thread</a> class which created the current thread object. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>a <a class="el" href="classost_1_1_thread.html" title="Every thread of execution in an application is created by instantiating an object...">Thread</a> *, or "(Thread *)this" if no parent. </dd></dl>

</div>
</div>
<a class="anchor" id="a300c229e76725eeddc69867f7ecea91f"></a><!-- doxytag: member="ost::Thread::initial" ref="a300c229e76725eeddc69867f7ecea91f" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void ost::Thread::initial </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The initial method is called by a newly created thread when it starts execution. </p>
<p>This method is ran with deferred cancellation disabled by default. The Initial method is given a separate handler so that it can create temporary objects on it's own stack frame, rather than having objects created on <a class="el" href="classost_1_1_thread.html#add7d339d94b8a1ed2b2b0324a95b7e74" title="All threads execute by deriving the Run method of Thread.">run()</a> that are only needed by startup and yet continue to consume stack space.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classost_1_1_thread.html#add7d339d94b8a1ed2b2b0324a95b7e74" title="All threads execute by deriving the Run method of Thread.">run</a> </dd>
<dd>
<a class="el" href="classost_1_1_thread.html#a6fb521eb3d23c51925472a3fe0abf327" title="A thread that is self terminating, either by invoking exit() or leaving it&#39;s...">final</a> </dd></dl>

<p>Reimplemented in <a class="el" href="classost_1_1_t_c_p_session.html#ad0a0568018d48cc3079222156a6af093">ost::TCPSession</a>, and <a class="el" href="classost_1_1_unix_session.html#a5762091d1418fca6b4970c9c5a5b347f">ost::UnixSession</a>.</p>

</div>
</div>
<a class="anchor" id="a1bbbe1d6bc6dea6bea48cdabe2c7da20"></a><!-- doxytag: member="ost::Thread::isDetached" ref="a1bbbe1d6bc6dea6bea48cdabe2c7da20" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ost::Thread::isDetached </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Check if this thread is detached. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the thread is detached. </dd></dl>

</div>
</div>
<a class="anchor" id="aa04a06a086dffad7ffc67dba4ea431ab"></a><!-- doxytag: member="ost::Thread::isRunning" ref="aa04a06a086dffad7ffc67dba4ea431ab" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ost::Thread::isRunning </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Verifies if the thread is still running or has already been terminated but not yet deleted. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the thread is still executing. </dd></dl>

</div>
</div>
<a class="anchor" id="a69ae124edf7e7989db0f911b847cacae"></a><!-- doxytag: member="ost::Thread::isThread" ref="a69ae124edf7e7989db0f911b847cacae" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ost::Thread::isThread </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Tests to see if the current execution context is the same as the specified thread object. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the current context is this object. </dd></dl>

</div>
</div>
<a class="anchor" id="a1e6d355ea0d9b0b023f3fc2aa91a25e8"></a><!-- doxytag: member="ost::Thread::join" ref="a1e6d355ea0d9b0b023f3fc2aa91a25e8" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ost::Thread::join </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Blocking call which unlocks when thread terminates. </p>

</div>
</div>
<a class="anchor" id="a390827ad98d3402dd84ee9f128bcd564"></a><!-- doxytag: member="ost::Thread::notify" ref="a390827ad98d3402dd84ee9f128bcd564" args="(Thread *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void ost::Thread::notify </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classost_1_1_thread.html">Thread</a> *&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>When a thread terminates, it now sends a notification message to the parent thread which created it. </p>
<p>The actual use of this notification is left to be defined in a derived class.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>-</em>&nbsp;</td><td>the thread that has terminated. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a0861f734ad77b1ba517fce302215e41e"></a><!-- doxytag: member="ost::Thread::resume" ref="a0861f734ad77b1ba517fce302215e41e" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ost::Thread::resume </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Resumes execution of the selected thread. </p>

</div>
</div>
<a class="anchor" id="add7d339d94b8a1ed2b2b0324a95b7e74"></a><!-- doxytag: member="ost::Thread::run" ref="add7d339d94b8a1ed2b2b0324a95b7e74" args="(void)=0" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void ost::Thread::run </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected, pure virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>All threads execute by deriving the Run method of <a class="el" href="classost_1_1_thread.html" title="Every thread of execution in an application is created by instantiating an object...">Thread</a>. </p>
<p>This method is called after Initial to begin normal operation of the thread. If the method terminates, then the thread will also terminate after notifying it's parent and calling it's Final() method.</p>
<dl class="see"><dt><b>See also:</b></dt><dd>Initial </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="bug1_8cpp-example.html#a1">bug1.cpp</a>, <a class="el" href="bug2_8cpp-example.html#a2">bug2.cpp</a>, <a class="el" href="tcpservice_8cpp-example.html#a17">tcpservice.cpp</a>, <a class="el" href="tcpstr1_8cpp-example.html#a2">tcpstr1.cpp</a>, <a class="el" href="tcpthread_8cpp-example.html#a7">tcpthread.cpp</a>, <a class="el" href="thread1_8cpp-example.html#a1">thread1.cpp</a>, and <a class="el" href="thread2_8cpp-example.html#a1">thread2.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="a4bff373a83b90f6f44d1519ef893e35b"></a><!-- doxytag: member="ost::Thread::setCancel" ref="a4bff373a83b90f6f44d1519ef893e35b" args="(Cancel mode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ost::Thread::setCancel </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classost_1_1_thread.html#a24f333b09607b7c48a97e05865ada69b">Cancel</a>&nbsp;</td>
          <td class="paramname"> <em>mode</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets thread cancellation mode. </p>
<p>Threads can either be set immune to termination (cancelDisabled), can be set to terminate when reaching specific "thread cancellation points" (cancelDeferred) or immediately when Terminate is requested (cancelImmediate).</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>mode</em>&nbsp;</td><td>for cancellation of the current thread. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ae9f30b27ca1322ccc3325ba9ca5157fa"></a><!-- doxytag: member="ost::Thread::setException" ref="ae9f30b27ca1322ccc3325ba9ca5157fa" args="(Throw mode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void ost::Thread::setException </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classost_1_1_thread.html#ab9538e839c06104af2974b77d2a5674d">Throw</a>&nbsp;</td>
          <td class="paramname"> <em>mode</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set exception mode of the current thread. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>exception mode. </dd></dl>

</div>
</div>
<a class="anchor" id="ab6f72653183c4db0dfd6b254ddbf072e"></a><!-- doxytag: member="ost::Thread::setName" ref="ab6f72653183c4db0dfd6b254ddbf072e" args="(const char *text)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ost::Thread::setName </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>text</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the name of the current thread. </p>
<p>If the name is passed as NULL, then the default name is set (usually object pointer).</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>text</em>&nbsp;</td><td>name to use. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="accd29b724539d63a8495d954f9f56c72"></a><!-- doxytag: member="ost::Thread::setStack" ref="accd29b724539d63a8495d954f9f56c72" args="(size_t size=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void ost::Thread::setStack </td>
          <td>(</td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>size</em> = <code>0</code></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set base stack limit before manual stack sizes have effect. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>stack size to set, or use 0 to clear autostack. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ad226f8bca85bf68ce71d90baca6434d6"></a><!-- doxytag: member="ost::Thread::setSuspend" ref="ad226f8bca85bf68ce71d90baca6434d6" args="(Suspend mode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ost::Thread::setSuspend </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classost_1_1_thread.html#aff7bd364ce645eac95affbf74f1a7087">Suspend</a>&nbsp;</td>
          <td class="paramname"> <em>mode</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the thread's ability to be suspended from execution. </p>
<p>The thread may either have suspend enabled (suspendEnable) or disabled (suspendDisable).</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>mode</em>&nbsp;</td><td>for suspend. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a663d960e8599194f3b25169915c22fb6"></a><!-- doxytag: member="ost::Thread::sleep" ref="a663d960e8599194f3b25169915c22fb6" args="(timeout_t msec)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void ost::Thread::sleep </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="thread_8h.html#af412159e5cef839836a5e7b19ee75d1c">timeout_t</a>&nbsp;</td>
          <td class="paramname"> <em>msec</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>A thread-safe sleep call. </p>
<p>On most Posix systems, "sleep()" is implimented with SIGALRM making it unusable from multipe threads. Pthread libraries often define an alternate "sleep" handler such as usleep(), nanosleep(), or nap(), that is thread safe, and also offers a higher timer resolution.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>msec</em>&nbsp;</td><td>timeout in milliseconds. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a2ef198d7aefb93cf9de4fcc6b66c27a2"></a><!-- doxytag: member="ost::Thread::start" ref="a2ef198d7aefb93cf9de4fcc6b66c27a2" args="(Semaphore *start=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ost::Thread::start </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classost_1_1_semaphore.html">Semaphore</a> *&nbsp;</td>
          <td class="paramname"> <em>start</em> = <code>0</code></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>When a new thread is created, it does not begin immediate execution. </p>
<p>This is because the derived class virtual tables are not properly loaded at the time the C++ object is created within the constructor itself, at least in some compiler/system combinations. The thread can either be told to wait for an external semaphore, or it can be started directly after the constructor completes by calling the <a class="el" href="classost_1_1_thread.html#a2ef198d7aefb93cf9de4fcc6b66c27a2" title="When a new thread is created, it does not begin immediate execution.">start()</a> method.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>error code if execution fails. </dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>start</em>&nbsp;</td><td>optional starting semaphore to alternately use. </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="tcpservice_8cpp-example.html#a19">tcpservice.cpp</a>, and <a class="el" href="tcpstr1_8cpp-example.html#a1">tcpstr1.cpp</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="a5f1b650c1f3b71e458adfbd86b3acb83"></a><!-- doxytag: member="ost::Thread::suspend" ref="a5f1b650c1f3b71e458adfbd86b3acb83" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ost::Thread::suspend </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Suspends execution of the selected thread. </p>
<p>Pthreads do not normally support suspendable threads, so the behavior is simulated with signals. On systems such as Linux that define threads as processes, SIGSTOP and SIGCONT may be used. </p>

</div>
</div>
<a class="anchor" id="a1cda4748073c4d55e2d0504e7c9b09cc"></a><!-- doxytag: member="ost::Thread::sync" ref="a1cda4748073c4d55e2d0504e7c9b09cc" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ost::Thread::sync </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Used to wait for a join or cancel, in place of explicit exit. </p>

</div>
</div>
<a class="anchor" id="ae71c94c24733ed82f9b74c034744d002"></a><!-- doxytag: member="ost::Thread::terminate" ref="ae71c94c24733ed82f9b74c034744d002" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ost::Thread::terminate </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Used by another thread to terminate the current thread. </p>
<p>Termination actually occurs based on the current <a class="el" href="classost_1_1_thread.html#a4bff373a83b90f6f44d1519ef893e35b" title="Sets thread cancellation mode.">setCancel()</a> mode. When the current thread does terminate, control is returned to the requesting thread. <a class="el" href="classost_1_1_thread.html#ae71c94c24733ed82f9b74c034744d002" title="Used by another thread to terminate the current thread.">terminate()</a> should always be called at the start of any destructor of a class derived from <a class="el" href="classost_1_1_thread.html" title="Every thread of execution in an application is created by instantiating an object...">Thread</a> to assure the remaining part of the destructor is called without the thread still executing. </p>

</div>
</div>
<a class="anchor" id="af8afe7a3330b69dff685415aae14657c"></a><!-- doxytag: member="ost::Thread::testCancel" ref="af8afe7a3330b69dff685415aae14657c" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ost::Thread::testCancel </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>test a cancellation point for deferred thread cancellation. </p>

</div>
</div>
<a class="anchor" id="a3f4a4f9872ed8f80a591e6b020ecf5d7"></a><!-- doxytag: member="ost::Thread::yield" ref="a3f4a4f9872ed8f80a591e6b020ecf5d7" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void ost::Thread::yield </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Yields the current thread's CPU time slice to allow another thread to begin immediate execution. </p>

</div>
</div>
<hr/><h2>Friends And Related Function Documentation</h2>
<a class="anchor" id="abbf97e2c58c760acb67b9db3a7ba11db"></a><!-- doxytag: member="ost::Thread::Cancellation" ref="abbf97e2c58c760acb67b9db3a7ba11db" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">friend class <a class="el" href="classost_1_1_cancellation.html">Cancellation</a><code> [friend]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a9b6e94561c96e07e8f2dd776bbc19396"></a><!-- doxytag: member="ost::Thread::DummyThread" ref="a9b6e94561c96e07e8f2dd776bbc19396" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">friend class DummyThread<code> [friend]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a2742c471d2abe8712368ccff8d534702"></a><!-- doxytag: member="ost::Thread::operator++" ref="a2742c471d2abe8712368ccff8d534702" args="(Thread &amp;th)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void operator++ </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classost_1_1_thread.html">Thread</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>th</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [friend]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Signal the semaphore that the specified thread is waiting for before beginning execution. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>th</em>&nbsp;</td><td>specified thread. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aa797f8e5a1ea5b857251f98f0d50614e"></a><!-- doxytag: member="ost::Thread::operator&#45;&#45;" ref="aa797f8e5a1ea5b857251f98f0d50614e" args="(Thread &amp;th)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void operator-- </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classost_1_1_thread.html">Thread</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>th</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [friend]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="abc1a729c4204bc85f58c47042f429acb"></a><!-- doxytag: member="ost::Thread::PosixThread" ref="abc1a729c4204bc85f58c47042f429acb" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">friend class <a class="el" href="classost_1_1_posix_thread.html">PosixThread</a><code> [friend]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ae156bb5074cfe5c3a729890e0ded952f"></a><!-- doxytag: member="ost::Thread::postream_type" ref="ae156bb5074cfe5c3a729890e0ded952f" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">friend class postream_type<code> [friend]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="af08013a89bf19b835ba6f75a60f870ed"></a><!-- doxytag: member="ost::Thread::Slog" ref="af08013a89bf19b835ba6f75a60f870ed" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">friend class <a class="el" href="classost_1_1_slog.html">Slog</a><code> [friend]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="ae3c1cdb20d70b22a5c0bf395614eefff"></a><!-- doxytag: member="ost::Thread::ThreadImpl" ref="ae3c1cdb20d70b22a5c0bf395614eefff" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">friend class ThreadImpl<code> [friend]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reimplemented in <a class="el" href="classost_1_1_posix_thread.html#ae3c1cdb20d70b22a5c0bf395614eefff">ost::PosixThread</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="thread_8h_source.html">thread.h</a></li>
</ul>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Fri Nov 12 09:55:48 2010 for GNU CommonC++ by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>