Boost logo

Boost :

From: Christopher Kohlhoff (chris_at_[hidden])
Date: 2008-01-14 06:37:50


Roland Schwarz wrote:
> 1) What is happening:
> In code similar to the http server3 example I have
> one client connection open (waiting for a read)
> and one pending incoming connection.
>
> Shuting down the server (Ctrl-C) shows inconsistent
> behaviour:
> *) Either everything works well or
> *) the open connection socket gets closed, but the
> connection objects dtor does not get called or
> *) there is an access violation, with odd stack
> frame (somewhere from biolsp.dll ?!)
>
> 2) What change made it work for me?
> In the file win_iocp_io_service.hpp on line 94 in
> function shutdown_service I changed the timeout value
> from zero to 10 msec.
>
> To me the problem looks as if it was not possible to
> reliably find out the number of outstanding operations.
> Since 10 msec is as arbitrary a number as 0 I guess
> the proposed change is not a solution but only masking
> the error in a different manner.
>
> This would mean that it would be necessary to record
> the outstanding operations in a separate list and
> call the destructors on all that have not been retrieved
> by GetQueuedCompletionStatus.

If this is the problem, maintaining a counter of outstanding operations
should be sufficient.

Can you please add some debugging code to confirm whether the number of
items dequeued using GetQueuedCompletionStatus differs when you use the
10msec timeout. Thanks.

Cheers,
Chris


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk