added eventlet.twisteds.join_reactor - helper for integrating eventlet with twisted reactor's mainloop

This commit is contained in:
Denis Bilenko
2008-10-29 13:31:22 +06:00
parent 6baf93e434
commit 5606ddd79c

View File

@@ -0,0 +1,13 @@
"""Integrate eventlet with twisted's reactor mainloop.
You generally don't have to use it unless you need to call reactor.run()
yourself.
"""
from eventlet.hubs.twistedr import BaseTwistedHub
from eventlet.api import use_hub, _threadlocal
from eventlet.support import greenlet
use_hub(BaseTwistedHub)
assert not hasattr(_threadlocal, 'hub')
hub = _threadlocal.hub = _threadlocal.Hub(greenlet.getcurrent())