[Twisted-web] Having reactor run at the main thread make
things harder for late adopters
andrew-twisted at puzzling.org
Wed Nov 5 17:02:45 EST 2008
Andrew McNabb wrote:
> On Wed, Nov 05, 2008 at 03:11:08PM +1100, Andrew Bennetts wrote:
> > The documentation could perhaps be clearer about this (that document implies,
> > but doesn't directly state, that there's only one reactor instance).
> I've always struggled with reactor being a singleton. It makes it very
> difficult to use Twisted on a small scale in a larger existing project.
> Sometimes it would be really nice to stop a reactor and later start
> another one. Unit testing is one of several situations where this can
> be a problem.
> I suppose this wouldn't be quite as severe of a problem if it were easy
> to restart a stopped reactor, but even then, it would be nice to be able
> to have two threads that each have their own reactor. But I guess I'm
> just ranting now. :)
Oh, I completely agree. I was just talking about the documentation for what
we have now.
More information about the Twisted-web