Author mahmoud
Recipients adaptivelogic, eric.snow, gvanrossum, mahmoud, martius, ncoghlan, pitrou, rbcollins, rhettinger, vstinner, xonatius, yselivanov
Date 2015-02-10.23:08:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Hey all, great to see this being worked on so diligently for so long. Having worked in this area for a while (at home and at PayPal), we've got a few learnings to share:

1) linecache is textbook not-threadsafe. For example,

For a lightweight traceback wrapper to be concurrency-friendly, we've had to catch KeyErrors, like so:

It's kind of a blanket approach, but maybe we could make a separate issue and help out with a linecache refresh?

2) We use something like (filename, lineno) in our DeferredLine class, but for very lightweight areas (e.g., greenlet creation) we just save a reference to the code object, as the additional attribute accesses do end up showing up in the profiles.

3) Generally we've found the APIs in TracebackInfo here to be pretty sufficient/functional:

Let me know if you've got any questions on that, and keep up the good work!
Date User Action Args
2015-02-10 23:08:24mahmoudsetrecipients: + mahmoud, gvanrossum, rhettinger, ncoghlan, pitrou, vstinner, rbcollins, eric.snow, yselivanov, adaptivelogic, martius, xonatius
2015-02-10 23:08:24mahmoudsetmessageid: <>
2015-02-10 23:08:24mahmoudlinkissue17911 messages
2015-02-10 23:08:23mahmoudcreate