On Thu, 9 Sep 2004 23:50:55 +0200, Thomas Weholt <thomas.weholt@gmail.com> wrote:
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.
Unless you're reading off of a network filesystem or similar slow FS layer, you don't need to worry about the filesystem blocking. If the files are big, it should be fine to just read only N kilobytes per reactor iteration, or whatever. That's how twisted.web's static file serving code works, and it works fine. -- Twisted | Christopher Armstrong: International Man of Twistery Radix | Release Manager, Twisted Project ---------+ http://radix.twistedmatrix.com