Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > f448deafa1de20c56618e7ac9c6ef5d7 > files > 95

Falcon-doc-0.9.6.6-1.fc14.noarch.rpm

<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <title>Class Event - Class Event</title>
   <link href="faldoc.css" rel="stylesheet" type="text/css"/>
   <link href="tabs.css" rel="stylesheet" type="text/css"/>
</head>
<body class="faldoc_body">
<div class="navitop">
   <div class="tabs">
      <ul>
         <li><a href="./index.html"><span>Main</span></a></li>
         <li><a href="./modules.html"><span>Modules</span></a></li>
         <li><a href="./pages.html"><span>Related pages</span></a></li>
         <li><a href="./groups.html"><span>Groups</span></a></li>
         <li><a href="./classes.html"><span>Classes</span></a></li>
         <li><a href="./objects.html"><span>Objects</span></a></li>
         <li><a href="./functions.html"><span>All functions</span></a></li>
         <li><a href="./enum.html"><span>Enumerations</span></a></li>
         
      </ul>
   </div>
</div>
<hr/>

<h1 class="faldoc_title">Class Event<span class="faldoc_belong"><a href="./module_feathers_threading.html">[in Threading]</a></p></h1>

<p class="faldoc_brief">Signaler of relevant processing conditions. </p>
<p class="faldoc_funcdecl">
<b>class</b> Event( [mode] ) \
      <b>from</b> <a href="./class_Waitable.html">Waitable</a>
</p>


   <p class="faldoc_brief"><a href="#more">more...</a></p>
   <h2 class="faldoc_title">Summary</h2>
   <table class="faldoc_list">
   
      
         <tr><td><a href="#reset">reset()</a></td><td>Resets the event, preventing threads from acquiring it. </td></tr>
      
         <tr><td><a href="#set">set()</a></td><td>Sets the Event and allow a waiting thread to proceed. </td></tr>
      
   
   </table>





   <h3 class="faldoc_title">Inherited methods</h3>
   <table class="faldoc_list">
   
      <tr><td><a href="./class_Waitable.html#release">release</a> from Waitable&nbsp;</td><td>Releases a structure acquired by a waiting function. </td></tr>
   
   </table>



<a name="more"><h2 class="faldoc_title">Detailed description</h2></a>

<p class="faldoc_funcdecl">
<b>class</b> Event( [mode] ) \
      <b>from</b> <a href="./class_Waitable.html">Waitable</a>
</p>
<table class="faldoc_function">

<tr><td class="faldoc_optparam">mode</td><td class="faldoc_optparamdesc">Set to true to create a manual reset event. </td></tr>
</table>
<br/>
<p class="item_brief">Signaler of relevant processing conditions. </p>
<p class="faldoc_text">Falcon events can be used to signal that a certain condition is met, that a certain resource has become ready to be processed, or that shared data is now available for exclusive access. </p>
<p class="faldoc_text">Events start their activity in "reset state". When they are reset, a wait on them blocks any tread. When they are in "set" state, they become acquireable. Only one thread at a time can acquire a set event, and the acquiring threads holds exclusively the event structure untill it releases it. </p>
<p class="faldoc_text">When the event is acquired, if the event has been created as automatic, it is automically reset. New set requests can be then issued both by the acquiring thread and by other threads while the event is being held and the data associated to the event is processed. If the event is created in manual mode, the event is not reset at acquisition; if the conditions that the event has signaled is not anymore valid, the acquiring thread must reset the event before releasing it. </p>
<p class="faldoc_text">When the acquiring thread releases the event, if the event is still set (or if it has been set after the automatic or manual reset), another waiting thread can be immediately selected to proceed and acquire the event. </p>
<p class="faldoc_text">Events support late signaling. If the event is set when there isn't any thread waiting for it, the first thread trying to wait on that will proceed immediately, acquiring the event and being free to reset it. </p>
<p class="faldoc_note"><span class="faldoc_notetype">Note:</span> The semantic of this structure is slightly different from the sematic of the well known "Event Variable" in the MS-Windows SDK. Mainly, Falcon events allows only to one thread at a time to proceed, and grant atomicity of access to data associated with the event. </p>
<p class="faldoc_text"> By default, this constructor creates an automatic event, whose set status is automatically reset as a thread is able to acquire it. To create a manual reset event, which must be reset by the acquiring thread when it finds that other threas could not progress, call this constructor with <b>mode</b> set to true. </p>




   <h2 class="faldoc_title">Methods</h2>
   
      <h3 class="faldoc_funcname"><a name="reset">reset()</a></h3>
      <p class="item_brief">Resets the event, preventing threads from acquiring it. </p>
      <p class="faldoc_funcdecl">Event.reset( )</p>
      
      
   
      <h3 class="faldoc_funcname"><a name="set">set()</a></h3>
      <p class="item_brief">Sets the Event and allow a waiting thread to proceed. </p>
      <p class="faldoc_funcdecl">Event.set( )</p>
      
      
   

<hr/>
<div class="navibottom">
   <center>
      <a href="./index.html">Main</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./modules.html">Modules</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./pages.html">Related pages</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./groups.html">Groups</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./classes.html">Classes</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./objects.html">Objects</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./functions.html">All functions</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./enum.html">Enumerations</a>
   </center>
</div>
</div>
<div class="faldoc_signature">Made with <a href="http://www.falconpl.org">faldoc 2.2.0</div>
</body>
</html>