Timeout on read()?

Paul Duffin pduffin at hursley.ibm.com
Fri Aug 25 04:58:44 EDT 2000


David Bolen wrote:
> 
> "Alex Martelli" <alex at magenta.com> writes:
> 
> > You clearly have more experience with overlapped I/O on NT, than
> > I have, so, thanks for sharing this experience!  What about
> > asynchronously called completion routines -- how good/bad/reliable/&c
> > have you found them, if you've tried them out?
> 
> I don't tend to use completion routines as much (as mentioned later in
> the post) because the explicit synchronization of the overlapped I/O
> has tended to fit better with my code to this point.  I actually like
> threads in many cases too, so I'm not always trying to replace one
> with the other.  But my take on things is that once you've got NT off
> treating a bit of I/O as an asynchronous operation (whether you're
> going to use the overlapped event to signal its completion or have a
> completion routine) you're in good shape.  At least NT seems well
> structured to manage such I/O operations - where I seem to get into
> trouble is when I let it start blocking internally on I/O operations.
> It's gotten so that I just default to an overlapped I/O with the
> blocking GetOverlappedResult just to avoid any risk.  Of course, then
> I get bit by the cases where you can't do that (like anonymous pipes,
> which don't support overlapped I/O) :-)
> 

Aaaaaarrrrrrggggggghhhhhhhh !!!!!!!!

Windows I/O is SO inconsistent it hurts my head just to think about it.



More information about the Python-list mailing list