[Twisted-Python] when will failure.Failure() be a problem?

gelin yan dynamicgl at gmail.com
Fri Mar 23 01:48:33 EDT 2012


Hi All

 As regards issues like #5567 & #4219, Failure object creation is not
thread safe. I use deferToThread daily due to many blocking apis still have
to be used in my system. I looked into the code and noticed there is a
global count used in Failure.__init__. An increment will be made for every
__init__ invoke. I consider it is one part can be treated as thread unsafe.

   Because I didn't use Failure() besides of logging exec_info and didn't
meet any crash issue related to Failure() so I consider it is not a serious
problem. I am curious who has experience like system crash or data
corruption with Failure.


Regards

gelin yan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20120323/5aa0f4cf/attachment.htm 


More information about the Twisted-Python mailing list