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

hongxing777 at gmail.com hongxing777 at gmail.com
Fri Sep 21 03:17:29 CDT 2007

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?

More information about the Ace-users mailing list