I'll write some file i/o support for Twisted to be non-blocking but I
still wonder about the following: does writing to a file ever block?
Yes. The data have to be written somewhere. Depending on the OS this
may be either the buffer or the page cache, but either way it's possible
that a write could block waiting for a resource to become available. A
fair number of system hangs come down to this, actually, because it's a
rare enough case that it's often not very well thought through or
tested. For this very reason, it's probably OK to pretend it doesn't
happen. When it does, it usually means the whole system's in pretty bad
shape, and an unexpected pause in one application is probably the least
of your worries.
_______________________________________________
p2p-hackers mailing list
[email protected]
http://lists.zooko.com/mailman/listinfo/p2p-hackers