2004.11.04 18:31 "[Tiff] is libtiff thread-safe?", by James Xu

2004.11.05 01:06 "Re: [Tiff] is libtiff thread-safe?", by Chris Cox

There is a threading issue because the thread which experiences the error is also the one which would normally make use of the detailed error information. When the code which invoked a libtiff function returns, it needs to be able to retrieve the error information so that it can properly inform the user. That means that the libtiff warning/error callback must store the error info in some thread-specific place so that it may be retrieved once the libtiff function returns. If the functions provided a pointer to user context then the error information could simply be stored there, without any need to use an OS-specific thread-API function to support thread-specific storage.

Also, if you want to go the simple route:

printf is not very threadsafe -- it may not crash, but calling it from multiple threads will rarely do what you expect.