Closed aisk closed 2 months ago
The failed tests are caused by https://github.com/pytest-dev/pytest/issues/12263, as that issue said it will be fixed on tornado or pytest repository, so I'll leave as it is for now.
This change would invoke error AttributeError: '_thread._local' obiect has no attribute 'thrift_stack'
when using it with example code:
>>> from thriftpy2.parser. parser import parse
>>> note_thrift = parse("path/ to/ note. thrift")
Related to #232.
I'm not sure if this can totally resolve the original issue, because reproducing a multi-thread bug is hard. I'd like to ship the change because it wouldn't introduce any trouble, and wait to see if there will be more multi-thread issues with the parser. Otherwise, we should introduce a big lock for all these
load
methods.