On Wed, 27 Apr 2005 07:07:15 -0700 (PDT), Joachim Boomberschloss email@example.com wrote:
Thanks, how embarassing... I suggest adding it to the "using threads" howto (I'd do it myself if I knew how). Another idea: make an asynchronous file-handling module that wraps Python's file IO with something that has a deferred-oriented interface. Is there already something like that too?
There's not, yet (although likely the VFS project Chris Armstrong, Andy Gayton, Tim Stebbing, and Andrew Bennetts recently started on will probably encompass this at some point).
For many projects, asynchronous disk file i/o isn't actually that important. They either only do a little bit of it, or they can fragment it over multiple reactor iterations manually without too much effort. This is probably the main reason there isn't something like adbapi for files in Twisted already.
For projects that do a lot of disk IO (like an ftp server, say :), or have latency requirements more stringent than average, an asynchronous file API would definitely be useful.