pysimdjson icon indicating copy to clipboard operation
pysimdjson copied to clipboard

Thread safe Parser?

Open gingerwizard opened this issue 3 years ago • 2 comments

Can we assume the parser is thread safe and can be used by multiple threads concurrently for parse?

gingerwizard avatar Mar 03 '22 08:03 gingerwizard

In simdjson, you should have a distinct parser instance per thread.

lemire avatar Mar 03 '22 13:03 lemire

I've reopened this because at the python level, we can prevent people from shooting themselves in the foot and using a parser across threads. We can't stop someone whose using ctypes or or otherwise interacting from C land but it's better than nothing.

TkTech avatar Mar 05 '22 14:03 TkTech