From: Felipe Magno de Almeida (felipe.m.almeida_at_[hidden])
Date: 2005-08-31 01:03:07
On 8/18/05, Christopher Kohlhoff <chris_at_[hidden]> wrote:
> I'd appreciate input on:
> - Any other things that should be on the list.
win_iocp_operation is a base class that takes a pointer to a function
and when called(when the IO operation is completed) it executes its
pointer. The pointer is normally a static function to a derived class
that calls the apropriate handler.
There's a comment above win_iocp_operation that is this:
// Base class for all IOCP operations. A function pointer is used instead of
// virtual functions to avoid the associated overhead.
But I dont quite follow the virtual function overhead in this case. I
think that asio is reinventing the wheel and with the same overhead.
The only way to have less overhead would be to make win_iocp_operation
calls the apropriate handler directly, but I dont see that as very
possible. The derived function must do some interpretation of the
arguments before calling the handler. I think the best solution is to
make win_iocp_operation be an abstract class with a virtual function
and have the derived functions overwrite the method.
I know it is a very implementation detail that dont even add much. But
it helps a little to understand asio code and writing more code for
-- Felipe Magno de Almeida Developer from synergy and Computer Science student from State University of Campinas(UNICAMP). Unicamp: http://www.ic.unicamp.br Synergy: http://www.synergy.com.br "There is no dark side of the moon really. Matter of fact it's all dark."
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk