[Twisted-Python] possible error in twisted app
exarkun at twistedmatrix.com
exarkun at twistedmatrix.com
Sun Jan 19 18:54:27 MST 2014
On 19 Jan, 09:27 pm, twisted-python at 2xlp.com wrote:
>Thanks for the offer to help.
>
>
>i'm not sure of the specifics on how / why this manifests, but if I
>just use runInteraction and bypass using `deferToThread`, everything
>works out perfect.
To intentionally slightly misinterpret you, the specifics might not be
as interesting in this case as this general principle:
Twisted APIs are not safe to call except from the thread the reactor is
running in.
There are exceptions, most notably `reactor.callFromThread`, but they
are *extremely* rare.
Jean-Paul
More information about the Twisted-Python
mailing list