[Ace-users] [ace-users] Message Passing Between Two Tasks

David Demland ddemland at marchnetworks.com
Fri Dec 14 11:10:07 CST 2007


Steve,

Thank you for the information. I have been using the APG (First book I
got when it looked like I might go down the ACE path). I assumed that
there would be a way for the framework to sign up tasks and use the
message queues. Here is what I was looking for:

      Task1 ---->  Message Queue Task2 ---->  Task2

In this case Task1 could tell Task2 to do something by placing a message
in the message queue of Task2; then Task2 would be able to process the
message.

You are right there will have to be a way for both tasks to know about
the queue. I thought that ACE would have a way to advertise queues for
tasks to know about them, but I am not sure how. Is there a way for the
framework to advertise queues, or do I have something wrong with my
assumptions?

Thank You,

David

-----Original Message-----
From: Steve Huston [mailto:shuston at riverace.com] 
Sent: Friday, December 14, 2007 9:54 AM
To: David Demland; ace-users at cse.wustl.edu
Subject: RE: [ace-users] Message Passing Between Two Tasks

Hi David,

> I am very new to ACE

Welcome!

> I am trying to see how to pass messages between two different
> tasks. All the examples show message queues in a single task,
> where can I go to get an example of message passing between two
> tasks?

You'll need a way for one task to know about the other, then you can
call putq() on the destination task to enqueue the message.

If your different tasks are related (e.g., different steps in
processing) you may want to look into the Streams framework as well
(see C++NPv2 chapter 9 and APG chapter 18; for book info see
http://www.riverace.com/acebooks/index.htm)

Best regards,
-Steve

--
Steve Huston, Riverace Corporation
Want to take ACE training on YOUR schedule?
See http://www.riverace.com/training.htm





More information about the Ace-users mailing list