[Twisted-web] Having reactor run at the main thread make things harder for late adopters

Andrew Bennetts andrew-twisted at puzzling.org
Wed Nov 5 01:41:44 EST 2008

Jean-Paul Calderone wrote:
> On Wed, 5 Nov 2008 15:11:08 +1100, Andrew Bennetts <andrew-twisted at puzzling.org> wrote:
>> Yes, it is a singleton.  As
>> <http://twistedmatrix.com/projects/core/documentation/howto/reactor-basics.html>
>> says:
>>    You can get to the reactor object using the following code:
>>        from twisted.internet import reactor
>> The documentation could perhaps be clearer about this (that document implies,
>> but doesn't directly state, that there's only one reactor instance).
> Although I don't see how it matters if it's a singleton or not. :)  If it
> weren't, you could just pass the reactor you were using to the thread that
> needed to use it.

It matters just because it makes it clear that yes, “from twisted.internet
import reactor” really does Just Work, all the time.


More information about the Twisted-web mailing list