Open objcode opened 12 years ago
Maybe to start we don't modify core at all. Twisted has it's own version of Service that runner should be able to just take from the config file.
With the coming of Context, Twisted services will need to run within these Context services to take advantage of configuration and named services. This also means Twisted will need to run with gevent. Perhaps we can do this without cluttering our class hierarchy by making an explicit TwistedContext that will start Twisted in a separate thread and start the Twisted Application there. This means regular Context won't automatically be able to load Twisted apps, but we can put special case code in the runner as opposed to anything in core or context.
Since 0.5.0, this is potentially possible (at least in theory) through AsyncManagers. It has not been researched yet.
Looking at this, I see two paths:
I'll take a look at going down option 1 later this week in a branch and see if clean code can be made.
Sean