Boost logo

Boost :

From: Christopher Kohlhoff (chris_at_[hidden])
Date: 2005-12-21 04:27:33

Hi Caleb,

--- Caleb Epstein <caleb.epstein_at_[hidden]> wrote:
> I had to interrupt the program by attaching a debugger to get
> it to run to completion (explaining the low result for the
> last SYNC loop). One thread seems to get stuck in a "recv"
> call (sync_server::run) that does not get interrupted by
> main's call to s0.stop(). Not sure if this is a bug in the
> test program or in asio.

I suspect the problem is that the test program is closing the
socket from one thread while the recv call is still in progress.
I don't believe you can portably terminate a synchronous receive
operation by closing the socket.

If you do require behaviour where a receive is terminated by
close, the asynchronous receive operation is guaranteed to
return as soon as possible with the operation_aborted error.


Boost list run by bdawes at, gregod at, cpdaniel at, john at