intel / hyperscan

High-performance regular expression matching library
https://www.hyperscan.io
Other
4.83k stars 722 forks source link

Does hs_set_allocator is thread safe. #348

Closed JackYangzg closed 2 years ago

JackYangzg commented 2 years ago

My program has mutil threads, I want to using hs_set_allocator to set thread private alloctor.

Can I using hs_set_allocator init the thread and not affect the other thread.

hongyang7 commented 2 years ago

It's not thread safe, as this function will modify global allocators for various data objects.