[Twisted-Python] Re: [Twisted-commits] Somehow the waker still messes up cfreactor, never installing waker for now

Bob Ippolito bob at redivi.com
Wed Nov 12 01:20:07 EST 2003

On Nov 12, 2003, at 12:22 AM, Itamar Shtull-Trauring wrote:

> On Tue, 11 Nov 2003 21:43:23 -0700
> etrepum CVS <etrepum at wolfwood.twistedmatrix.com> wrote:
>> Modified files:
>> Twisted/twisted/internet/cfreactor.py 1.3 1.4
>> Log message:
>> Somehow the waker still messes up cfreactor, never installing waker
>> for now
> That means threaded programs with cfreactor will be really slow.
> I think the issue is that the unix waker uses python sockets. You
> probably want to write your own waker using whatever APIs you are 
> using.
> While we're at it - warner, could we have the mac os x reactor also run
> tests with cfreactor?

I don't know what the deal is, exactly, because it uses python sockets 
internally and that works perfectly fine.  I believe that something 
about the waker causes the run loop to think that it's always awake.  I 
didn't feel like looking too far into it.  That said, Apple's 
implementation of CFRunLoop does everything that the reactor does (and 
then some), including thread waking and other thread communication 
facilities.. so when I have more time I'll look into the cause and the 
appropriate solution.    IIRC the only part of Twisted that uses 
threads on its own is the DB stuff, anything else would probably be 
implemented using more native means (nobody uses cfreactor for 
cross-platform applications yet), so I don't see an immediate problem 
with ignoring the waker.  I'd rather punish threaded (from what Twisted 
sees) applications than make all applications really really slow and 
resource hungry.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2357 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20031112/fe67f30f/attachment.bin 

More information about the Twisted-Python mailing list