On 09:38 am, cwelling...@ccg.murdoch.edu.au wrote:
>Hi there,
>
>I am using twisted trial to run test cases for an application. The
>application however uses stackless python and has a custom stackless
>reactor. I implemented this reactor like this...

It looks like your custom reactor is mainly in charge of making sure 
stackless.schedule() gets called at least once every 0.1 seconds.  Is 
that right?  If so, a much better approach would be to use 
twisted.internet.task.LoopingCall rather than implementing a custom 
reactor.

Is there something undesirable about that (much simpler, less fragile) 
approach?

As for your actual question, if you want a new reactor to be as usable 
as one of the existing ones, you need to write a plugin declaring its 
available.  Take a look at twisted/plugins/twisted_reactors.py for some 
examples.

Jean-Paul

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to