Boost logo

Boost Users :

Subject: [Boost-users] bug in asio?
From: Hei Chan (structurechart_at_[hidden])
Date: 2010-08-23 17:50:30


Hi,

I am using a 3rd party library that uses boost::asio.

The 3rd party library will call asyn_receive() with a callback handler, then
when boost::asio::detail:: receive_op::do_complete() calls the callback handler,
the handler consumes the message, calls asyn_receive() and then if there is no
more message, it (the thread) waits for a condition -- the callback handler gets
called again.

The problem now is that once there is no more message, the thread enters the
wait condition, and it never gets waken up again.

Is it incorrect to enter the wait condition in the same thread that calls
boost::asio::detail:: receive_op::do_complete()?

Thanks in advance.

Cheers,
Hei

      


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net