summaryrefslogtreecommitdiff
path: root/docs/tutorials/016/page01.html
blob: 057ca7142d97c39d09afbc70e167c4b8407addfa (plain)
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
<HTML>
<HEAD>
   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
   <META NAME="Author" CONTENT="James CE Johnson">
   <TITLE>ACE Tutorial 016</TITLE>
</HEAD>
<BODY TEXT="#000000" BGCOLOR="#FFFFFF" LINK="#000FFF" VLINK="#FF0F0F">

<CENTER><B><FONT SIZE=+2>ACE Tutorial 016</FONT></B></CENTER>

<CENTER><B><FONT SIZE=+2>Making ACE_Condition easier to use</FONT></B></CENTER>

<P>
<HR WIDTH="100%">
The ACE framework has quite a few objects for syncronizing your
threads and even processes.  We've mentioned a few in passing already: 
 ACE_Thread_Mutex and ACE_Barrier for instance.
<P>
Another interesting one is the ACE_Condition template.  By using an
ACE_Condition you can have your code wait for an arbitrary condition 
to occur.  That condition is "embodied" in a variable of your choice.
That variable can, in turn, be any data type you wish.  This makes
ACE_Condition much more flexible than a simple mutex, barrier or
semaphore.
<P>
In this tutorial, I'll create a wrapper class around the ACE_Condition 
and the assorted housekeeping items necessary to make it work.  I'll
use a simple integer as the condition variable but keep in mind that
you can use any data type you want.
<P><HR WIDTH="100%">
<CENTER>[<A HREF="../online-tutorials.html">Tutorial Index</A>] [<A HREF="page02.html">Continue This Tutorial</A>]</CENTER>