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

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

<CENTER><B><FONT SIZE=+2>Passing chunks of data through an ACE_Message_Queue</FONT></B></CENTER>


<P>
<HR WIDTH="100%">
<P>
In an earlier tutorial we briefly introduced ACE_Message_Queue.  In this
tutorial we'll go into a bit more detail.
<P>
ACE_Message_Queue is modeled after Unix System V IPC mechanisms.  The basic
idea is that you put a block of data into one end of the Queue and take it
out of the other end.  Your basic FIFO in other words.  The SysV mechanism
works great for passing these blocks of data between processes on the same
host but it's a bit overkill for moving blocks between threads.  You could
use a pipe, socket or similar mechanism but that still has more overhead than
we really want just for moving data between threads.  Process-global memory
is a good technique but then you need a way to signal the "listening" threads.
The ACE_Message_Queue is a better approach:  Create blocks of data and enqueue
them in one thread while another thread (or threads) dequeue and perform work.
<P>
<HR WIDTH="100%">
<CENTER>[<A HREF="../online-tutorials.html">Tutorial Index</A>] [<A HREF="page02.html">Continue
This Tutorial</A>]</CENTER>

</BODY>
</HTML>