2

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?

vy32
  • 28,461
  • 37
  • 122
  • 246

1 Answers1

3

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

Mark
  • 46
  • 1