<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.6000.16587" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=463151022-14122007><FONT face=Arial color=#0000ff size=2>Hi
Vlad,</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=463151022-14122007><FONT face=Arial color=#0000ff size=2>Thank
you for jumping right in and offering assistance on the
list!</FONT></SPAN></DIV>
<DIV><SPAN class=463151022-14122007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=463151022-14122007><FONT face=Arial color=#0000ff size=2>In
this case, your suggestion adds more work than is necessary, as the
ACE_Message_Queue in each ACE_Task includes, and automatically
uses, the synchronization objects you suggest. Please review the design
rationale in C++NPv2 chapter 6 for further information.</FONT></SPAN></DIV>
<DIV><SPAN class=463151022-14122007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=463151022-14122007><FONT face=Arial color=#0000ff size=2>I hope
we hear more from you in the future.</FONT></SPAN></DIV>
<DIV><SPAN class=463151022-14122007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=463151022-14122007><FONT face=Arial color=#0000ff
size=2>-Steve</FONT></SPAN></DIV><!-- Converted from text/plain format -->
<P><FONT size=2>--<BR>Steve Huston, Riverace Corporation<BR>Want to take ACE
training on YOUR schedule?<BR>See <A
href="http://www.riverace.com/training.htm">http://www.riverace.com/training.htm</A><BR></FONT></P>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> Vlad
Imshenetskiy [mailto:Vlad.Imshenetskiy@capstoneco.com] <BR><B>Sent:</B>
Friday, December 14, 2007 12:52 PM<BR><B>To:</B> shuston@riverace.com;
ddemland@marchnetworks.com; ace-users@cse.wustl.edu<BR><B>Subject:</B> Re:
[ace-users] Message Passing Between Two Tasks<BR><BR></FONT></DIV><!-- Converted from text/plain format -->
<P><FONT size=2>Hi,<BR><BR>I'm also new to ACE and maybe it has better tools
but so far it sounds to me like all you need is to use mutex and conditional
variable. Task1 locks the queue puts message on the queue signals task2 using
conditional variable. Task2 grabs a lock, checks if there are messages on the
queue, if not - waits on conditional variable for signal. Depending on wether
the tasks run on separate threads or processes (I believe ACE has mutexes/cond
var for processes as well as threads) use proper ace tools.<BR><BR>Search ace
docs for ace_mutex and ace_condition as there are a few macros and classes and
I don't remember exact names<BR><BR>Vlad<BR><BR><BR>----- Original Message
-----<BR>From: ace-users-bounces@cse.wustl.edu
<ace-users-bounces@cse.wustl.edu><BR>To: 'David Demland'
<ddemland@marchnetworks.com>; ace-users@cse.wustl.edu
<ace-users@cse.wustl.edu><BR>Sent: Fri Dec 14 12:37:54 2007<BR>Subject:
Re: [ace-users] Message Passing Between Two Tasks<BR><BR>Hi David,<BR><BR>>
Thank you for the information. I have been using the APG (First
book<BR>I<BR>> got when it looked like I might go down the ACE path). I
assumed<BR>that<BR>> there would be a way for the framework to sign up
tasks and use the<BR>> message queues. Here is what I was looking
for:<BR>><BR>> Task1 ---->
Message Queue Task2 ----> Task2<BR><BR>Ok.<BR><BR>> In this case
Task1 could tell Task2 to do something by<BR>> placing a message<BR>> in
the message queue of Task2; then Task2 would be able to process<BR>the<BR>>
message.<BR><BR>Right.<BR><BR>> You are right there will have to be a way
for both tasks to know<BR>about<BR>> the queue.<BR><BR>Actually, what you
need is for Task 1 to know about Task 2.<BR><BR>> I thought that ACE would
have a way to advertise queues for<BR>> tasks to know about them, but I am
not sure how. Is there a<BR>> way for the<BR>> framework to advertise
queues, or do I have something wrong with my<BR>> assumptions?<BR><BR>You
have something wrong in your assumptions, probably. There's no<BR>general
advertisement of available queues. However, if Task1 and Task2<BR>were part of
a Stream, they wouldn't need to know about each other,<BR>Task 1 would simply
forward the message along the stream and it would<BR>get to Task
2.<BR><BR>-Steve<BR><BR>--<BR>Steve Huston, Riverace Corporation<BR>Want to
take ACE training on YOUR schedule?<BR>See <A
href="http://www.riverace.com/training.htm">http://www.riverace.com/training.htm</A><BR><BR><BR>_______________________________________________<BR>ace-users
mailing list<BR>ace-users@mail.cse.wustl.edu<BR><A
href="http://mail.cse.wustl.edu/mailman/listinfo/ace-users">http://mail.cse.wustl.edu/mailman/listinfo/ace-users</A><BR></FONT></P><PRE></PRE>This message and any attachments (the "message") is intended solely
for the addressee and is confidential. This should not be construed as an
offer or solicitation to do business. If you receive this message in error,
please delete it and immediately notify the sender. Any dissemination,
duplication, publication to third parties or other use of the contents of this
e-mail or its attachments is forbidden. The internet cannot guarantee the
integrity of this message. The Capstone Group (its subsidiaries) shall (will)
not therefore be liable for the message if modified. Please note that any
views or opinions presented in this email are solely those of the author and
do not necessarily represent those of the company. Although this information
has been compiled with great care, the Capstone Group shall not accept any
responsibility for any errors, omissions or other inaccuracies in this
information or for the consequences thereof, nor shall it be bound in any way
by the contents of this e-mail or its attachments. If you are not the intended
recipient you are notified that disclosing, copying, distributing or taking
any action in reliance on the contents of this information is strictly
prohibited. Finally, the recipient should check this email and any attachments
for the presence of viruses. The company accepts no liability for any damage
caused by any virus transmitted by this email. </BLOCKQUOTE></BODY></HTML>