Boost logo

Boost :

From: Christopher Kohlhoff (chris_at_[hidden])
Date: 2008-01-14 08:32:46


Roland Schwarz wrote:
> In my code I have the dtors of my connection objects emit a message
> when they are called. Since they use the shared_from_this trick
> they are invoked when the overlapped structure is been deleted since
> they are bound to them.
>
> So I am pretty sure I can see when the call to destruct the overlapped
> is missing.
>
> On the other hand I can see that the socket is closed properly since
> the client receives the shutdown request.
>
> I would be glad if you could give me another hint which kind of
> debug message would be helpful to you.

Don't worry, what you describe above already sounds like sufficient
evidence.

> On the other hand, perhaps some (mathematical) reasoning also can
> help: If the socket is closed, which property guarantees that
> the queued completion status invoked with zero timeout will
> see the associated overlapped for sure?
> Or put it another way: why not waiting infinitely when we are
> sure there must be something pending? Why zero timeout?

That's exactly what I meant by "maintaining a counter of outstanding
operations", and I've just checked in such a change. Please let me know
how it goes.

Cheers,
Chris


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