<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.11"/> <title>glibmm: Glib::Threads::Thread Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> <link href="doxygen-extra.css" rel="stylesheet" type="text/css"/> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">glibmm  <span id="projectnumber">2.60.0</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.11 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</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="examples.html"><span>Examples</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="inherits.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespaceGlib.html">Glib</a></li><li class="navelem"><a class="el" href="namespaceGlib_1_1Threads.html">Threads</a></li><li class="navelem"><a class="el" href="classGlib_1_1Threads_1_1Thread.html">Thread</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#nested-classes">Classes</a> | <a href="#pub-methods">Public Member Functions</a> | <a href="#pub-static-methods">Static Public Member Functions</a> | <a href="#related">Related Functions</a> | <a href="classGlib_1_1Threads_1_1Thread-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">Glib::Threads::Thread Class Reference<div class="ingroups"><a class="el" href="group__Threads.html">Threads</a></div></div> </div> </div><!--header--> <div class="contents"> <p>Represents a running thread. <a href="classGlib_1_1Threads_1_1Thread.html#details">More...</a></p> <p><code>#include <glibmm/threads.h></code></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> Classes</h2></td></tr> <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Threads_1_1Thread_1_1Exit.html">Exit</a></td></tr> <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Exception class used to exit from a thread. <a href="classGlib_1_1Threads_1_1Thread_1_1Exit.html#details">More...</a><br /></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr class="memitem:ad3808e7e2f243c675b12f5ca0755f9f6"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Threads_1_1Thread.html#ad3808e7e2f243c675b12f5ca0755f9f6">Thread</a> (const <a class="el" href="classGlib_1_1Threads_1_1Thread.html">Thread</a>&)=delete</td></tr> <tr class="separator:ad3808e7e2f243c675b12f5ca0755f9f6"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a616d128d0555ba10c2af271e2d59c971"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1Threads_1_1Thread.html">Thread</a>& </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Threads_1_1Thread.html#a616d128d0555ba10c2af271e2d59c971">operator=</a> (const <a class="el" href="classGlib_1_1Threads_1_1Thread.html">Thread</a>&)=delete</td></tr> <tr class="separator:a616d128d0555ba10c2af271e2d59c971"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ad68ccd7d8209913f09f742aef95758e1"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Threads_1_1Thread.html#ad68ccd7d8209913f09f742aef95758e1">join</a> ()</td></tr> <tr class="memdesc:ad68ccd7d8209913f09f742aef95758e1"><td class="mdescLeft"> </td><td class="mdescRight">Waits until the thread finishes. <a href="#ad68ccd7d8209913f09f742aef95758e1">More...</a><br /></td></tr> <tr class="separator:ad68ccd7d8209913f09f742aef95758e1"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:ae2afcdad184e8064ab21edcb287e50d3"><td class="memItemLeft" align="right" valign="top">GThread* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Threads_1_1Thread.html#ae2afcdad184e8064ab21edcb287e50d3">gobj</a> ()</td></tr> <tr class="separator:ae2afcdad184e8064ab21edcb287e50d3"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a36d0432f001070d70cc52946b9e797f7"><td class="memItemLeft" align="right" valign="top">const GThread* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Threads_1_1Thread.html#a36d0432f001070d70cc52946b9e797f7">gobj</a> () const </td></tr> <tr class="separator:a36d0432f001070d70cc52946b9e797f7"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a> Static Public Member Functions</h2></td></tr> <tr class="memitem:ad89d142f0a9fd02d476dbed49dd17b85"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classGlib_1_1Threads_1_1Thread.html">Thread</a>* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Threads_1_1Thread.html#ad89d142f0a9fd02d476dbed49dd17b85">create</a> (const <a class="elRef" href="../../../libsigc++-2.0/reference/html/classsigc_1_1slot.html">sigc::slot</a>< void >& slot)</td></tr> <tr class="memdesc:ad89d142f0a9fd02d476dbed49dd17b85"><td class="mdescLeft"> </td><td class="mdescRight">Creates a new thread. <a href="#ad89d142f0a9fd02d476dbed49dd17b85">More...</a><br /></td></tr> <tr class="separator:ad89d142f0a9fd02d476dbed49dd17b85"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a2ffdf8dd86ea405669f610c7d47c90e9"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classGlib_1_1Threads_1_1Thread.html">Thread</a>* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Threads_1_1Thread.html#a2ffdf8dd86ea405669f610c7d47c90e9">create</a> (const <a class="elRef" href="../../../libsigc++-2.0/reference/html/classsigc_1_1slot.html">sigc::slot</a>< void >& slot, const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a>& name)</td></tr> <tr class="memdesc:a2ffdf8dd86ea405669f610c7d47c90e9"><td class="mdescLeft"> </td><td class="mdescRight">Creates a new named thread. <a href="#a2ffdf8dd86ea405669f610c7d47c90e9">More...</a><br /></td></tr> <tr class="separator:a2ffdf8dd86ea405669f610c7d47c90e9"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a7289f43e01199fa1cf7df67f725f8cef"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classGlib_1_1Threads_1_1Thread.html">Thread</a>* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Threads_1_1Thread.html#a7289f43e01199fa1cf7df67f725f8cef">self</a> ()</td></tr> <tr class="memdesc:a7289f43e01199fa1cf7df67f725f8cef"><td class="mdescLeft"> </td><td class="mdescRight">Returns the Thread* corresponding to the calling thread. <a href="#a7289f43e01199fa1cf7df67f725f8cef">More...</a><br /></td></tr> <tr class="separator:a7289f43e01199fa1cf7df67f725f8cef"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a0b4e6d3fe278429716f0e0cca3654fde"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGlib_1_1Threads_1_1Thread.html#a0b4e6d3fe278429716f0e0cca3654fde">yield</a> ()</td></tr> <tr class="memdesc:a0b4e6d3fe278429716f0e0cca3654fde"><td class="mdescLeft"> </td><td class="mdescRight">Gives way to other threads waiting to be scheduled. <a href="#a0b4e6d3fe278429716f0e0cca3654fde">More...</a><br /></td></tr> <tr class="separator:a0b4e6d3fe278429716f0e0cca3654fde"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="related"></a> Related Functions</h2></td></tr> <tr><td class="ititle" colspan="2"><p>(Note that these are not member functions.) </p> </td></tr> <tr class="memitem:ga6bfbb3119eaac9fa8cb725aa1e82f61e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGlib_1_1Threads_1_1Thread.html">Thread</a>* </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Threads.html#ga6bfbb3119eaac9fa8cb725aa1e82f61e">wrap</a> (GThread* gobject)</td></tr> <tr class="memdesc:ga6bfbb3119eaac9fa8cb725aa1e82f61e"><td class="mdescLeft"> </td><td class="mdescRight">A C++ wrapper for the C object. <a href="group__Threads.html#ga6bfbb3119eaac9fa8cb725aa1e82f61e">More...</a><br /></td></tr> <tr class="separator:ga6bfbb3119eaac9fa8cb725aa1e82f61e"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>Represents a running thread. </p> <p>An instance of this class can only be obtained with <a class="el" href="classGlib_1_1Threads_1_1Thread.html#ad89d142f0a9fd02d476dbed49dd17b85" title="Creates a new thread. ">create()</a>, <a class="el" href="classGlib_1_1Threads_1_1Thread.html#a7289f43e01199fa1cf7df67f725f8cef" title="Returns the Thread* corresponding to the calling thread. ">self()</a>, or <a class="el" href="group__Threads.html#ga6bfbb3119eaac9fa8cb725aa1e82f61e" title="A C++ wrapper for the C object. ">wrap(GThread*)</a>. It's not possible to delete a <a class="el" href="classGlib_1_1Threads_1_1Thread.html" title="Represents a running thread. ">Thread</a> object. You must call <a class="el" href="classGlib_1_1Threads_1_1Thread.html#ad68ccd7d8209913f09f742aef95758e1" title="Waits until the thread finishes. ">join()</a> to avoid a memory leak.</p> <dl class="section note"><dt>Note</dt><dd>g_thread_exit() is not wrapped, because that function exits a thread without any cleanup. That's especially dangerous in C++ code, since the destructors of automatic objects won't be invoked. Instead, you can throw a <a class="el" href="classGlib_1_1Threads_1_1Thread_1_1Exit.html" title="Exception class used to exit from a thread. ">Threads::Thread::Exit</a> exception, which will be caught by the internal thread entry function.</dd> <dd> The thread entry slot doesn't have the void* return value that a GThreadFunc has. If you want to return any data from your thread, you can pass an additional output argument to the thread's entry slot.</dd></dl> <dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000046">Deprecated:</a></b></dt><dd>Please use <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a02972.html">std::thread</a> instead. </dd></dl> </div><h2 class="groupheader">Constructor & Destructor Documentation</h2> <a class="anchor" id="ad3808e7e2f243c675b12f5ca0755f9f6"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">Glib::Threads::Thread::Thread </td> <td>(</td> <td class="paramtype">const <a class="el" href="classGlib_1_1Threads_1_1Thread.html">Thread</a>& </td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">delete</span></span> </td> </tr> </table> </div><div class="memdoc"> </div> </div> <h2 class="groupheader">Member Function Documentation</h2> <a class="anchor" id="ad89d142f0a9fd02d476dbed49dd17b85"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classGlib_1_1Threads_1_1Thread.html">Thread</a>* Glib::Threads::Thread::create </td> <td>(</td> <td class="paramtype">const <a class="elRef" href="../../../libsigc++-2.0/reference/html/classsigc_1_1slot.html">sigc::slot</a>< void > & </td> <td class="paramname"><em>slot</em></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Creates a new thread. </p> <p>You can wait for this thread's termination by calling <a class="el" href="classGlib_1_1Threads_1_1Thread.html#ad68ccd7d8209913f09f742aef95758e1" title="Waits until the thread finishes. ">join()</a>.</p> <p>The new thread executes the function or method <em>slot</em> points to. You can pass additional arguments using <a class="elRef" href="../../../libsigc++-2.0/reference/html/group__bind.html#ga2f099bc6056b32f2a58134ba8537c6f4">sigc::bind()</a>. If the thread was created successfully, it is returned, otherwise a <a class="el" href="classGlib_1_1Threads_1_1ThreadError.html" title="Exception class for thread-related errors. ">Threads::ThreadError</a> exception is thrown.</p> <p>Because <a class="elRef" href="../../../libsigc++-2.0/reference/html/structsigc_1_1trackable.html">sigc::trackable</a> is not thread-safe, if the slot represents a non-static class method and is created by <a class="elRef" href="../../../libsigc++-2.0/reference/html/group__mem__fun.html#gadf6b6d22c503b439019f0a2e77352419">sigc::mem_fun()</a>, the class concerned should not derive from <a class="elRef" href="../../../libsigc++-2.0/reference/html/structsigc_1_1trackable.html">sigc::trackable</a>. You can use, say, boost::bind() or, in C++11, <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01513.html#ga7b2eddb726568256e49824ad01a05099">std::bind()</a> or a C++11 lambda expression instead of <a class="elRef" href="../../../libsigc++-2.0/reference/html/group__mem__fun.html#gadf6b6d22c503b439019f0a2e77352419">sigc::mem_fun()</a>.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">slot</td><td>A slot to execute in the new thread. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>The new Thread* on success. </dd></dl> <dl class="exception"><dt>Exceptions</dt><dd> <table class="exception"> <tr><td class="paramname"><a class="el" href="classGlib_1_1Threads_1_1ThreadError.html" title="Exception class for thread-related errors. ">Glib::Threads::ThreadError</a></td><td></td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="a2ffdf8dd86ea405669f610c7d47c90e9"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classGlib_1_1Threads_1_1Thread.html">Thread</a>* Glib::Threads::Thread::create </td> <td>(</td> <td class="paramtype">const <a class="elRef" href="../../../libsigc++-2.0/reference/html/classsigc_1_1slot.html">sigc::slot</a>< void > & </td> <td class="paramname"><em>slot</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01512.html#ga32db3d9898c44d3b3a578b560f7758cc">std::string</a> & </td> <td class="paramname"><em>name</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Creates a new named thread. </p> <p>You can wait for this thread's termination by calling <a class="el" href="classGlib_1_1Threads_1_1Thread.html#ad68ccd7d8209913f09f742aef95758e1" title="Waits until the thread finishes. ">join()</a>.</p> <p>The new thread executes the function or method <em>slot</em> points to. You can pass additional arguments using <a class="elRef" href="../../../libsigc++-2.0/reference/html/group__bind.html#ga2f099bc6056b32f2a58134ba8537c6f4">sigc::bind()</a>. If the thread was created successfully, it is returned, otherwise a <a class="el" href="classGlib_1_1Threads_1_1ThreadError.html" title="Exception class for thread-related errors. ">Threads::ThreadError</a> exception is thrown.</p> <p>Because <a class="elRef" href="../../../libsigc++-2.0/reference/html/structsigc_1_1trackable.html">sigc::trackable</a> is not thread-safe, if the slot represents a non-static class method and is created by <a class="elRef" href="../../../libsigc++-2.0/reference/html/group__mem__fun.html#gadf6b6d22c503b439019f0a2e77352419">sigc::mem_fun()</a>, the class concerned should not derive from <a class="elRef" href="../../../libsigc++-2.0/reference/html/structsigc_1_1trackable.html">sigc::trackable</a>. You can use, say, boost::bind() or, in C++11, <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01513.html#ga7b2eddb726568256e49824ad01a05099">std::bind()</a> or a C++11 lambda expression instead of <a class="elRef" href="../../../libsigc++-2.0/reference/html/group__mem__fun.html#gadf6b6d22c503b439019f0a2e77352419">sigc::mem_fun()</a>.</p> <p>The <em>name</em> can be useful for discriminating threads in a debugger. It is not used for other purposes and does not have to be unique. Some systems restrict the length of <em>name</em> to 16 bytes.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">slot</td><td>A slot to execute in the new thread. </td></tr> <tr><td class="paramname">name</td><td>A name for the new thread. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>The new Thread* on success. </dd></dl> <dl class="exception"><dt>Exceptions</dt><dd> <table class="exception"> <tr><td class="paramname"><a class="el" href="classGlib_1_1Threads_1_1ThreadError.html" title="Exception class for thread-related errors. ">Glib::Threads::ThreadError</a></td><td></td></tr> </table> </dd> </dl> <dl class="since_2_36"><dt><b><a class="el" href="since_2_36.html#_since_2_36000005">Since glibmm 2.36:</a></b></dt><dd></dd></dl> </div> </div> <a class="anchor" id="ae2afcdad184e8064ab21edcb287e50d3"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GThread* Glib::Threads::Thread::gobj </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> </div> </div> <a class="anchor" id="a36d0432f001070d70cc52946b9e797f7"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const GThread* Glib::Threads::Thread::gobj </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const</td> </tr> </table> </div><div class="memdoc"> </div> </div> <a class="anchor" id="ad68ccd7d8209913f09f742aef95758e1"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Glib::Threads::Thread::join </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Waits until the thread finishes. </p> <p>Waits until the thread finishes, i.e. the slot, as given to <a class="el" href="classGlib_1_1Threads_1_1Thread.html#ad89d142f0a9fd02d476dbed49dd17b85" title="Creates a new thread. ">create()</a>, returns or g_thread_exit() is called by the thread. (Calling g_thread_exit() in a C++ program should be avoided.) All resources of the thread including the <a class="el" href="classGlib_1_1Threads_1_1Thread.html" title="Represents a running thread. ">Glib::Threads::Thread</a> object are released. </p> </div> </div> <a class="anchor" id="a616d128d0555ba10c2af271e2d59c971"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classGlib_1_1Threads_1_1Thread.html">Thread</a>& Glib::Threads::Thread::operator= </td> <td>(</td> <td class="paramtype">const <a class="el" href="classGlib_1_1Threads_1_1Thread.html">Thread</a>& </td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">delete</span></span> </td> </tr> </table> </div><div class="memdoc"> </div> </div> <a class="anchor" id="a7289f43e01199fa1cf7df67f725f8cef"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static <a class="el" href="classGlib_1_1Threads_1_1Thread.html">Thread</a>* Glib::Threads::Thread::self </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Returns the Thread* corresponding to the calling thread. </p> <dl class="section return"><dt>Returns</dt><dd>The current thread. </dd></dl> </div> </div> <a class="anchor" id="a0b4e6d3fe278429716f0e0cca3654fde"></a> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">static void Glib::Threads::Thread::yield </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </td> <td class="mlabels-right"> <span class="mlabels"><span class="mlabel">static</span></span> </td> </tr> </table> </div><div class="memdoc"> <p>Gives way to other threads waiting to be scheduled. </p> <p>This function is often used as a method to make busy wait less evil. But in most cases, you will encounter, there are better methods to do that. So in general you shouldn't use this function. </p> </div> </div> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Tue Mar 19 2019 09:56:48 for glibmm by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.11 </small></address> </body> </html>