[Twisted-Python] Addition to twisted.python.logfile
Donovan Baarda
abo at minkirri.apana.org.au
Sun Oct 20 18:13:05 MDT 2002
On Sun, Oct 20, 2002 at 02:53:54PM -0500, Glyph Lefkowitz wrote:
> On Sun, 20 Oct 2002 21:59:52 +0300, Tommi Virtanen <tv at twistedmatrix.com> wrote:
> > EW! A compression of a file has _nothing_ shared with the
> > main execution context. A thread is just _so_ much the
> > wrong tool.
>
> As with many potentially icky things in Twisted, this is for portability... I'd
> rather have it done once in a thread than done twice: once in a thread (for
> Windows/Java) and once in a Process (for UNIX).
Compression of a whole file might take too long for twisted to do in it's
event loop, but an incremental compression using the python zlib module
wouldn't... just compress a block at a time and use the twisted event loop.
This saves spawning a thread or process.
--
----------------------------------------------------------------------
ABO: finger abo at minkirri.apana.org.au for more info, including pgp key
----------------------------------------------------------------------
More information about the Twisted-Python
mailing list