[ace-users] When putq returns -1(caused by pulse), the value of ACE_OS::last_error is not correct.

Douglas C. Schmidt schmidt at dre.vanderbilt.edu
Fri Sep 21 09:17:15 CDT 2007


Hi,

Please see Chapter 6 of C++NPv2 <www.cs.wustl.edu/~schmidt/ACE/book2/>
for discussions and examples on pulse() et al. and why ESHUTDOWN is used.

Thanks,

        Doug

>ACE version: 5.6.0
>host: Windows XP SP2
>compiler: Visual Studio 7.1
>
>My class is derived from ACE_Task<ACE_MT_SYNCH>.  In another thread, I
>call putq to
>put message block to the message queue. When the queue is full, the
>putq is blocked because
>the flow control of the message queue.
>
>Then I call pulse of the message queue,  which causes putq to return
>-1 with the value of
>ACE_OS::last_error() is 10058. In Windows,  it means ESHUTDOWN.
>
>I think this error value is not suitable because the queue is not
>shutdown but only pulsed.
>so It's better to return EWOULDBLOCK as its value. right?
>


-- 
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