I am using the method:

ACE_Task::putq (ACE_Message_Block *mb, ACE_Time_Value *tv)

Here is the line where I call it: ret = putq(mb, const_cast(&ACE_Time_Value::zero));

What I am basically trying is that I need to get regular errors

EWOULDBLOCK and ESHUTDOWN from

int lastErr = ACE_OS::last_error();

in order to debug it right away...

So my question is, it there a simple way how to force such errors ?

I've already tried this: while ( ret >= 0 ) ret = putq(mb, const_cast(&ACE_Time_Value::max_time));

but my thread gets stuck after few calls and never returns from putq...

Many thanx in advance for hints !

Peter

有帮助吗?

解决方案

I think for the first part (EWOULDBLOCK) i can just use:

ACE_Svc_Handler::msg_queue()->high_water_mark(MAX_BUF_SIZE_BYTES); ACE_Svc_Handler::msg_queue()->low_water_mark(MIN_BUF_SIZE_BYTES);

I assume these fit my needs and what I observe is exactly what I need.

The envoking of ESHUTDOWN error is another problem, and you can simulate it by putting appropriately putting slow down sleep methods.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top