File: Poco.Condition.html

package info (click to toggle)
poco-doc 1.3.6-1.1
  • links: PTS
  • area: main
  • in suites: bullseye, sid
  • size: 10,080 kB
  • sloc: makefile: 31
file content (95 lines) | stat: -rw-r--r-- 7,252 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!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>
<title>Class Poco::Condition</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="language" content="en"/>
<meta name="date" content="2009-11-24"/>
<meta name="generator" content="PocoDoc"/>
<link rel="stylesheet" href="css/styles.css" type="text/css"/>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
<div class="header">
<h1 class="namespace"><a href="Poco.html" class="namespace">Poco</a></h1>
<h1 class="symbol">class Condition</h1>
</div>
<div class="body">
<p>
<b>Library:</b> Foundation<br />
<b>Package:</b> Threading<br />
<b>Header:</b> Poco/Condition.h</p>
<h2>Description</h2>
<div class="description">
<p>A <a href="Poco.Condition.html" title="class Poco::Condition">Condition</a> is a synchronization object used to block a thread  until a particular condition is met.  A <a href="Poco.Condition.html" title="class Poco::Condition">Condition</a> object is always used in conjunction with a <a href="Poco.Mutex.html" title="class Poco::Mutex">Mutex</a> (or <a href="Poco.FastMutex.html" title="class Poco::FastMutex">FastMutex</a>) object. </p>
<p><a href="Poco.Condition.html" title="class Poco::Condition">Condition</a> objects are similar to POSIX condition variables, which the difference that <a href="Poco.Condition.html" title="class Poco::Condition">Condition</a> is not subject to spurious wakeups. </p>
<p>Threads waiting on a <a href="Poco.Condition.html" title="class Poco::Condition">Condition</a> are resumed in FIFO order. </p>
</div>
<h2>Member Summary</h2>
<p><b>Member Functions: </b><a href="Poco.Condition.html#4259" title="Poco::Condition::broadcast()">broadcast</a>, <a href="Poco.Condition.html#4262" title="Poco::Condition::dequeue()">dequeue</a>, <a href="Poco.Condition.html#4260" title="Poco::Condition::enqueue()">enqueue</a>, <a href="Poco.Condition.html#4258" title="Poco::Condition::signal()">signal</a>, <a href="Poco.Condition.html#4255" title="Poco::Condition::tryWait()">tryWait</a>, <a href="Poco.Condition.html#4250" title="Poco::Condition::wait()">wait</a></p>
<h2>Constructors</h2>
<h3><a name="4248">Condition</a></h3>
<p class="decl"><a href="Poco.Condition.html" title="class Poco::Condition">Condition</a>();</p>
<div class="description">
<p>Creates the <a href="Poco.Condition.html" title="class Poco::Condition">Condition</a>. </p>
</div>
<h2>Destructor</h2>
<h3><a name="4249">~Condition</a></h3>
<p class="decl">~<a href="Poco.Condition.html" title="class Poco::Condition">Condition</a>();</p>
<div class="description">
<p>Destroys the <a href="Poco.Condition.html" title="class Poco::Condition">Condition</a>. </p>
</div>
<h2>Member Functions</h2>
<h3><a name="4259">broadcast</a></h3>
<p class="decl">void broadcast();</p>
<div class="description">
<p>Signals the <a href="Poco.Condition.html" title="class Poco::Condition">Condition</a> and allows all waiting threads to continue their execution. </p>
</div>
<h3><a name="4258">signal</a></h3>
<p class="decl">void signal();</p>
<div class="description">
<p>Signals the <a href="Poco.Condition.html" title="class Poco::Condition">Condition</a> and allows one waiting thread to continue execution. </p>
</div>
<h3><a name="4255">tryWait</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">template &lt; class Mtx &gt; bool tryWait(<br />&nbsp;&nbsp;&nbsp;&nbsp;Mtx &amp; mutex,<br />&nbsp;&nbsp;&nbsp;&nbsp;long milliseconds<br />);</p>
<div class="description">
<p>Unlocks the mutex (which must be locked upon calling <a href="Poco.Condition.html#4255" title="Poco::Condition::tryWait()">tryWait</a>()) and waits for the given time until the <a href="Poco.Condition.html" title="class Poco::Condition">Condition</a> is signalled. </p>
<p>The given mutex will be locked again upon leaving the  function, even in case of an exception. </p>
<p>Returns true if the <a href="Poco.Condition.html" title="class Poco::Condition">Condition</a> has been signalled within the given time interval, otherwise false. </p>
</div>
<h3><a name="4250">wait</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">template &lt; class Mtx &gt; void wait(<br />&nbsp;&nbsp;&nbsp;&nbsp;Mtx &amp; mutex<br />);</p>
<div class="description">
<p>Unlocks the mutex (which must be locked upon calling <a href="Poco.Condition.html#4250" title="Poco::Condition::wait()">wait</a>()) and waits until the <a href="Poco.Condition.html" title="class Poco::Condition">Condition</a> is signalled. </p>
<p>The given mutex will be locked again upon  leaving the function, even in case of an exception. </p>
</div>
<h3><a name="4252">wait</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">template &lt; class Mtx &gt; void wait(<br />&nbsp;&nbsp;&nbsp;&nbsp;Mtx &amp; mutex,<br />&nbsp;&nbsp;&nbsp;&nbsp;long milliseconds<br />);</p>
<div class="description">
<p>Unlocks the mutex (which must be locked upon calling <a href="Poco.Condition.html#4250" title="Poco::Condition::wait()">wait</a>()) and waits for the given time until the <a href="Poco.Condition.html" title="class Poco::Condition">Condition</a> is signalled. </p>
<p>The given mutex will be locked again upon successfully leaving the  function, even in case of an exception. </p>
<p>Throws a <a href="Poco.TimeoutException.html" title="class Poco::TimeoutException">TimeoutException</a> if the <a href="Poco.Condition.html" title="class Poco::Condition">Condition</a> is not signalled within the given time interval. </p>
</div>
<h3><a name="4262">dequeue</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void dequeue();</p>
<div class="description">
<p></p>
</div>
<h3><a name="4263">dequeue</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void dequeue(<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.Event.html" title="class Poco::Event">Event</a> &amp; event<br />);</p>
<div class="description">
<p></p>
</div>
<h3><a name="4260">enqueue</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void enqueue(<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.Event.html" title="class Poco::Event">Event</a> &amp; event<br />);</p>
<div class="description">
<p></p>
</div>
<p class="footer">POCO C++ Libraries 1.3.6-all<br />
Copyright &copy; 2009, <a href="http://pocoproject.org/" target="_blank">Applied Informatics Software Engineering GmbH and Contributors</a></p>

</div>
</body>
</html>