AWare Systems, Home TIFF and LibTiff Mail List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
January 2015

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date


The TIFF Mailing List Homepage
Archive maintained by AWare Systems

New Datamatrix section

Valid HTML 4.01!


2015.01.01 20:24 "Re: [Tiff] Fast TIFF Reading on Windows", by Aaron Boxer
2015.01.07 10:53 "Re: [Tiff] Fast TIFF Reading on Windows", by Roger Leigh
2015.01.07 15:26 "Re: [Tiff] Fast TIFF Reading on Windows", by Bob Friesenhahn

2015.01.07 15:26 "Re: [Tiff] Fast TIFF Reading on Windows", by Bob Friesenhahn

The major annoyance is the use of a global error handler which precludes the multiple callers being able to accurately report errors. I know the use of a mutex is a bit of a blunt instrument, but it's needed to save and restore the error handler and throw exceptions correctly in the calling thread. If libtiff could make the error reporting use thread- local structures, that would avoid the need to have threads contending on a mutex or other synchronisation primitive just to get an error message. If it was also thread-safe internally that would also be a huge improvement.

It is unfortunate that the global error handler was not fixed by 4.0.X. As a work-around, you can use thread-specific storage, which is supported by both POSIX threads and WIN32. GraphicsMagick uses thread specific storage to make the libtiff error reporting thread-safe.

Bob Friesenhahn,
GraphicsMagick Maintainer,