[Twisted-Python] Recursive filescanning in Twisted??
Thomas Weholt
thomas.weholt at gmail.com
Thu Sep 9 15:50:55 MDT 2004
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.
Thomas
On Thu, 09 Sep 2004 14:03:17 -0400, Jp Calderone <exarkun at divmod.com> wrote:
> Jeff Bowden wrote:
> > On Linux, file descriptors for disk files are always "ready".
>
> Right.
>
> > Since
> > twisted is based on select() or poll() I'm guessing you will end up
> > actually blocking on file reads.
>
> Right.
>
> > 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 ;).
>
> Jp
>
>
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
--
Mvh,
Thomas Weholt
http://www.weholt.org - thomas krøll weholt dått org
-----------------------------------------------------------------------------------------------------------------
Alltid morsomt å høre røykere snakke om inneklima og luftkvalitet.
More information about the Twisted-Python
mailing list