[Twisted-Python] Re: [Twisted-commits] r14922 - Fix to replace a lambda with something that's safe in the scope when it's
exarkun at divmod.com
Thu Oct 27 10:46:08 EDT 2005
On Thu, 27 Oct 2005 15:27:36 +0100, Matt Goodall <matt at pollenation.net> wrote:
>Matt Goodall wrote:
>> Jean-Paul Calderone wrote:
>>>On Thu, 27 Oct 2005 03:45:59 -0600, Matt Goodall
>>><mg at wolfwood.twistedmatrix.com> wrote:
>>>>Date: Thu Oct 27 03:45:58 2005
>>>>New Revision: 14922
>>>>Fix to replace a lambda with something that's safe in the scope when it's
>>>>actually executed .... just in case anyone else is actually using this
>>>Note that this changes the behavior from constructing Failure instances
>>>in the reactor thread to creating them in a worker thread.
>> Yes, very true. Thanks for raising it. Does it matter in this case?
>> All the the args passed to Failure are worked out in the thread and I
>> think that means Failure's __init__ does basically nothing. Did I miss
It may work fine now. The API isn't guaranteed to be threadsafe, though.
>Also, I think it's now pointless digging the exception information out
>of Python to pass to the Failure.__init__. That's what Failure will
>*now* do on its own when passed nothing.
As it stands in SVN now, I agree. The Failure was constructed that way before since it was being instantiated in a different thread than the one in which the exception occurred.
More information about the Twisted-Python