[Twisted-Python] CFReactor

James Y Knight foom at fuhm.net
Tue Oct 26 19:18:48 EDT 2004

On Oct 26, 2004, at 1:35 PM, Bob Ippolito wrote:
>> Er, I don't believe you. If that was the case, it would be a huge fd 
>> leak, which I'm pretty sure Twisted doesn't have. I removed that hack 
>> and I don't think anything further broke.
> No.  It's not a fd leak because loseConnection closes the file 
> descriptors.  It just doesn't tell the reactor it has done so.  It 
> should leak SSW instances (memory) now, though.

Those are only kept in a weakref dict, and in the readers/writers 
dicts. removeReader/removeWriter look to me like they are being called, 
so I think it should go away. I dunno if that's a change since 
cfreactor was written or if I'm just wrong or what.

>> Anyways, I've changed cfreactor to do what I think should be the 
>> right thing, but it's randomly failing tests. Before my changes it 
>> was failing a lot of tests too, so I don't know if this is a 
>> regression or not.
> I don't really have the time or need to debug this anytime soon.

Me neither. If no one is actually interested, I guess it should just be 
marked as probably broken and left at that. I'm going to give up on it.

> When I first wrote CFReactor, it passed all of the tests.  Either 
> changes in PyObjC (unlikely) or Twisted (likely) caused these test 
> failures.  Some of it is probably due to tests making incorrect 
> assumptions, especially because CFReactor isn't designed to be 
> iterated (it has to set up a timer to stop itself).

I can't even get the tests to run to completion, they hang on 
twisted.mail.test.test_smtp.LoopbackESMTPTestCase.testMessages. Since 
this reactor isn't being run on the buildbot for some reason, it's hard 
to know how long it's been failing.

I also tried checking out revisions 9056 from 2003-10-20 and 9286 from 
2003-11-11. Those are failing about a bazillion tests, mostly with 
pendingTimedCalls still pending: <DelayedCall 35813496 
[-0.0020911693573s] called=0 cancelled=0 
CFReactor._continueSystemEvent('startup',)> warnings. I dunno what's up 
with that.


More information about the Twisted-Python mailing list