[Twisted-Python] Re-entrancy policy for the reactor

Itamar Turner-Trauring itamar at itamarst.org
Wed Jul 27 19:42:22 MDT 2011

On Wed, 2011-07-27 at 18:10 -0400, Glyph Lefkowitz wrote:

> Mostly though, an additional queue for non-reentrancy would be an
> ad-hoc special-case solution to one tiny part of the more general
> problem that reactor event ordering is a complete accident with
> unforseen consequences.  If there were a more general scheduling
> mechanism, we could schedule events in a better order overall.

We already have a queue, for reactor.callFromThread. We could add, say,
reactor.runInABit, and make reactor.callFromThread that just adds a
waker notification after calling that.

More information about the Twisted-Python mailing list