
Thread
2011.05.06 17:07 "Re: [Tiff] Is LibTiff 3.9.5 Thread Safe ?", by Katerina Sedivy
You are right Bob, Delphi isn't thread safe either without a certain flag which I already have furthermore because I am using Delphi 6 I had even changed the memory manager since it is not thread safe as well.
However in file tif_dir.c I found this comment:
"* This can happen if multiple images are open with different
* codecs which have private tags. The global tag information
* table may then have tags that are valid for one file but not
* the other. If the client tries to set a tag that is not valid
* for the image's codec then we'll arrive here. This
* happens, for example, when tiffcp is used to convert between
* compression schemes and codec-specific tags are blindly copied."
I found this comment in the function _TIFFVGetField in the default section of the switch for the tags. The same comment exists in the SetField function.
Katerina
On Thu, May 5, 2011 at 4:16 PM, Bob Friesenhahn < bfriesen@simple.dallas.tx.us> wrote:
> <<a bunch of threads requested to open different TIFF files all at the
same
time>>
This is exactly my case<<the library has been exercised at least once>> What do you mean by exercised?
For example, reading or writing a file.
There is no specific thread-safety code in libtiff. The code is written to be re-entrant but there are still some static variables.
On some systems, it is necessary to build code with particular options in order to be thread safe (e.g. C library functions may otherwise not be thread safe). Libtiff does not (by itself) provide any such build options.