----- Original Message -----
> > -----Original Message-----
> >
> > Whaddyareckon? It definitely resolves the bug - verified it with
> > extension to the existing python test cases.
>
> What arbitrary rules does the python run time follow when switching threads?
>
> As I understand the original issue, is there may still a problem if the
> thread that detects the error is not the same as the thread that tries to
> copy the message buffer before the return in the variant function?
My understanding is that calls down to a C API are effectively atomic
from the interpreters POV (which makes sense, since there's not really
any opportunity to intercede once a library call is made).
> That's why I was proposing to carry an extra argument all down the call
> stack, so there was no thread private data being used in the *_r() function
> code path.
Yep, understood - that may be more than we need here though, fortunately.
> Just by the way, we use thread private data in other places ... are these
> potential hand grenades waiting for a Python detonator?
If they are detached from the error handling like derived metrics currently,
then yeah possibly. Which places did you have in mind?
cheers.
--
Nathan
|