[Twisted-Python] Recursive filescanning in Twisted??

Christopher Armstrong radeex at gmail.com
Thu Sep 9 18:09:24 EDT 2004

On Thu, 9 Sep 2004 23:50:55 +0200, Thomas Weholt
<thomas.weholt at 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

More information about the Twisted-Python mailing list