is lib magic thread-safe?

1.1k views Asked by At

I've been searching around, trying to find an answer. I know that I can create multiple libmagic instances, one for each thread, and that is thread-safe. But can I have a single instance shared between multiple threads?

1

There are 1 answers

1
Mark On BEST ANSWER

No, you cannot share libmagic handle/descriptor between two or more threads, in this sense libmagic is not threadsafe.