Ok, all the stuff about AIO ( I guess it's async. IO ) and IOCP doesn't mean much to me right now, but is it possible to just throw the heavy, blocking code into a seperate thread and synchronize writing data to the database, which is the only thing the seperate thread and the main thread Twisted is running in is sharing? Or I'm I over-simplifying things?
Any such example if doable would be great. Thanks for your input so far.
On Thu, 09 Sep 2004 14:03:17 -0400, Jp Calderone email@example.com wrote:
Jeff Bowden wrote:
On Linux, file descriptors for disk files are always "ready".
Since twisted is based on select() or poll() I'm guessing you will end up actually blocking on file reads.
I think you can get non-blocking file reads using the new AIO stuff
On some systems, right.
but it's not really a good match for a single process server like twisted.
Hmm. Why do you say this? It's true that AIO will require reactor support (IOCP is essentially such a reactor, except for Windows). I don't see a problem with using AIO in a single process, though, and apparently neither did Pavel when he wrote IOCP.
I don't know about BSD/OSX or Windows.
KQueue supports on-disk files, I suspect. There is no working KQueue reactor, though, so that takes care of BSD/OSX. Windows has IO Completion Ports, which IOCP uses (hence the name ;).
Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python