[Twisted-Python] Sporadic GeneratorExit when using deferredGenerator

CARSON DEAN FENIMORE fenimore at gmail.com
Tue May 11 20:28:04 EDT 2010


Just FYI: The problem appears to have gone away with some minor
changes.  We have twisted in use in a large application, which
consists of many threads.  These threads were invoking some
twisted-related methods; for example, calling addCallback on a
Deferred instance from one thread, while running a deferredGenerator
in twisted -- this, of course, is not thread safe!  Except for a
handful of such cases, we were using twisted correctly - adding
callbacks on the main thread solved the issue at hand.



On Mon, May 10, 2010 at 6:35 PM, Glyph Lefkowitz
<glyph at twistedmatrix.com> wrote:
>
> On May 10, 2010, at 8:04 PM, CARSON DEAN FENIMORE wrote:
>
>> I receive a GeneratorExit occasionally when using Twisted.  Has anyone
>> noticed this problem?  t I am on python 2.5 - as I understand it,
>> GeneratorExit derives from StandardError in 2.5, and BaseException in
>> 2.6.  The real problem in my code appears to be that the reference to
>> my generator itself is being dropped, causing it to become
>> invalidated. Additionally, the errback/callback chain is not
>> propagating the error correctly.
>>
>> Has anyone experienced similar problems?
>
> I don't know.  Do you have a traceback?  Where do you receive GeneratorExit?
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>



More information about the Twisted-Python mailing list