Can I audit maya scene with thread?

I want to analyze Maya file in real time.
So, I used threading.Thread and run properly in idle stat.
But, in case of scrubbing timeline, opening a file, and something like that, it freeze maya itself.

Of course I know Maya is not thread-safe.
But, is there any way to work around it?

Not really - almost everything you’d need to check in a scene has to be done in the main thread.

You can however run individual analysis functions as idle time scriptjobs – those are safe and will not freeze when younintersct eith the scene. They will take over the main thread when running, but if you break up the analysis into multiple small tasks you can interact with the scenes and the jobs will pause while you are manipulating things, resuming when you stop. That is about the best you can do in contemporary Maya.