[ace-users] search in message queue and message queue synchroniz ation

[ace-users] search in message queue and message queue synchroniz ation

Post by Efrat Ama » Fri, 26 Sep 2003 17:16:08


his message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.


ACE VERSION: 5.3.3

HOST MACHINE and OPERATING SYSTEM: Windows 2000, winsock2

TARGET MACHINE and OPERATING SYSTEM, if different from HOST:

COMPILER NAME AND VERSION (AND PATCHLEVEL): MVC++6

CONTENTS OF $ACE_ROOT/ace/config.h:

#define ACE_HAS_STANDARD_CPP_LIBRARY 1
#include "ace/config-win32.h"

CONTENTS OF $ACE_ROOT/include/makeinclude/platform_macros.GNU (unless
this isn't used in this case, e.g., with Microsoft Visual C++):

AREA/CLASS/EXAMPLE AFFECTED:
[What example failed? What module failed to compile?]

DOES THE PROBLEM AFFECT:
COMPILATION?
LINKING?
On Unix systems, did you run make realclean first?
EXECUTION?
OTHER (please specify)?
[Please indicate whether ACE, your application, or both are affected.]

SYNOPSIS:
[Brief description of the problem]

1. How can I search for specific message block in Message Queue, without
passing explicitly over all its items?
2. What is the Sync strategy of the default message queue of an ACE_Task,
created as followed:

Class CMyTask: public ACE_Task<ACE_MT_SYNCH>?

DESCRIPTION:
[Detailed description of problem. Don't just say "<blah>
doesn't work, here's a fix," explain what your program does
to get to the <blah> state. ]


I have an ACE_Task created as followed:
Class CMyTask: public ACE_Task<ACE_MT_SYNCH>
its default Message Queue contains a message block with a reference to
CMydata.

1. from another thread, (not from the task thread), I want to search the
task message queue, and enqueue the message block that contain a CMydata
with specific value.
how can make the search without passing explicitly over all the message
queue items?
is there a method like : " enquey by criteria" or something ...?

2. what is the sync strategy of the message queue of my kind of task?


Regards
Efrat

**************************************************************************************************
The contents of this email and any attachments are confidential.
It is intended for the named recipient(s) only.
If you have received this email in error please notify the system manager or the
sender immediately and do not disclose the contents to anyone or make copies.

** eSafe scanned this email for viruses, vandals and malicious content **
**************************************************************************************************

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1255">


<META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
<BODY style="COLOR: #000000; FONT-FAMILY: Arial" hb_focus_attach="true"><FONT
size=2></FONT>
<DIV><BR>ACE VERSION: 5.3.3<BR><BR>HOST MACHINE and OPERATING SYSTEM:<SPAN
class=346162504-08092003> Windows 2000, winsock2</SPAN><BR><BR>TARGET MACHINE
and OPERATING SYSTEM, if different from HOST:<BR></DIV>
<DIV>COMPILER NAME AND VERSION (AND PATCHLEVEL):<SPAN class=346162504-08092003>
MVC++6</SPAN><BR><BR>CONTENTS OF $ACE_ROOT/ace/config.h:<SPAN
class=346162504-08092003> <BR><SPAN class=
 
 
 

[ace-users] search in message queue and message queue synchroniz ation

Post by Douglas C. » Fri, 26 Sep 2003 23:09:20


Hi Efrat,


It's really not clear what you mean by "search for a specific message
block" since there's no "key" field in a message block. Therefore,
the best thing to do is to use the ACE_Message_Queue::ITERATOR
mechanism to examine each message block and use whatever specific
criteria you define in order to locate the message you want.


Hum, it's also not really clear why you're asking this question since
the answer is "ACE_MT_SYNCH", as evidenced from the trait you chose to
use above. Please see Chapter 6 of C++NPv2
<www.cs.wustl.edu/~schmidt/ACE/book2> for complete information about
ACE_Message_Queue and synchronization strategies.

Thanks,

Doug