2000.02.04 22:17 "threadsafety of libtiff 3.5.4?", by Joshua Blatt

2000.02.05 01:06 "Re: threadsafety of libtiff 3.5.4?", by Frank Warmerdam

Can anyone tell me whether the 3.5.4 library is threadsafe? Thanks, Josh

Joshua,

Earlier this week Scott Wagner said:
>LibTiff (including its Windows DLL incarnation) is almost(!) reentrant.
>That is, the only pieces which are non-reentrant are the pieces which set
>up the warning and error handlers. For most uses, this is OK - set up your
>warning and error handlers at initialization; then you can handle multiple
>images with multiple TIFF handles without collisions.

...

>The build of libtiff which I use is built from source by me - not Frank
>Warmerdam's build. Mine is a threadsafe DLL, and I call it from
>multithreaded applications. My experience is that (at least with my
>Borland compiler) the default C runtime library code selected is the more
>compact single-thread version; I have to select the multi-threaded CRTL as
>an option. This is probably true of VC++ as well.
>
>Frank, can you comment on this?

Everything he says makes sense to me. So take care to build it yourself against a multi-threaded run time library, and don't try to access the _same_ TIFF file from different threads concurrently.

Best regards,

---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerda@home.com
light and sound - activate the windows | http://members.home.com/warmerda
and watch the world go round - Rush    | Geospatial Programmer for Rent