[ace-users] putq does not block (returns -1) when message queue is full when using ACE_NULL_SYNCH strategy.

Douglas C. Schmidt schmidt at dre.vanderbilt.edu
Sun Jun 24 15:01:36 CDT 2007


Hi,

>Version: 5.5.8
>host: windows xp sp2, suse linux enterprise server 9 sp2
>compiler: vs.net 2003, gcc 3.3.3
>
>In my task derived class, I use ACE_NULL_SYNCH strategy:
>class MyTest : public ACE_Task<ACE_NULL_SYNCH>
>{
>...
>}
>
>because there are some variables of MyTest which all need to be
>protected, I use a mutex to
>protect these variables and the message queue. So I use the NULL
>protect strategy.
>But when I call putq(pmb) of MyTest and when the message queue is
>full, this function should be blocked, but it returns -1 with
>errno=EWOULDBLOCK.

ACE_Task is working precisely the way it should when configured with
ACE_NULL_SYNCH.  Please see Chapter 6 of C++NPv2
<www.cs.wustl.edu/~schmidt/ACE/book2/> for details.

Thanks,

        Doug

-- 
Dr. Douglas C. Schmidt                       Professor and Associate Chair
Electrical Engineering and Computer Science  TEL: (615) 343-8197
Vanderbilt University                        WEB: www.dre.vanderbilt.edu/~schmidt
Nashville, TN 37203                          NET: d.schmidt at vanderbilt.edu



More information about the Ace-users mailing list