Thriftpy / thriftpy2

Pure python approach of Apache Thrift.
MIT License
567 stars 90 forks source link

Thrift IDL file parse reports error in multi-threaded situation #232

Open 1C4nfaN opened 7 months ago

1C4nfaN commented 7 months ago

When my idl definition is more complex, I import idl files in multiple threads at the same time, and some exceptions will be thrown during the parser process.

Looking at the code, I found that the parser process does not seem to be thread-safe. If I want the code to work properly, I Add thread locks to my thread environment. I think a documentation tip may be needed here.