AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
November 2004

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2004.11.04 18:31 "is libtiff thread-safe?", by James Xu
2004.11.04 19:04 "Re: is libtiff thread-safe?", by Bob Friesenhahn
2004.11.04 19:09 "Re: is libtiff thread-safe?", by Chris Losinger
2004.11.04 19:19 "Re: is libtiff thread-safe?", by Bob Friesenhahn
2004.11.04 21:10 "Re: is libtiff thread-safe?", by Joris Van Damme
2004.11.04 21:20 "Re: is libtiff thread-safe?", by Chris Losinger
2004.11.04 21:35 "Re: is libtiff thread-safe?", by Bob Friesenhahn
2004.11.04 23:09 "Re: is libtiff thread-safe?", by Chris Cox
2004.11.04 23:51 "Re: is libtiff thread-safe?", by Joris Van Damme
2004.11.05 00:40 "Re: is libtiff thread-safe?", by Bob Friesenhahn
2004.11.05 00:53 "Re: is libtiff thread-safe?", by Phillip Crews
2004.11.05 12:19 "Re: is libtiff thread-safe?", by John Aldridge
2004.11.05 12:50 "Re: is libtiff thread-safe?", by Joris Van Damme
2004.11.05 01:06 "Re: is libtiff thread-safe?", by Chris Cox
2004.11.05 09:19 "Re: is libtiff thread-safe?", by Joris Van Damme
2004.11.05 14:38 "Re: is libtiff thread-safe?", by Bob Friesenhahn

2004.11.05 00:40 "Re: is libtiff thread-safe?", by Bob Friesenhahn

On Fri, 5 Nov 2004, Joris wrote:

> > Documenting that issue and suggesting that the callbacks contain a
> > mutex or critical section (if thread safety is an issue) might be a
> > good idea.
>
> I totally fail to see the connection between the lack of TIFF * parameter in the
> callbacks on the one hand, and multi-threading on the other. The callbacks are

In that case I will attempt to educate you.

> called in the same thread context as the call to LibTiff in which the error
> occured. There's no threading issue here.

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.

Bob
======================================
Bob Friesenhahn
bfriesen@simple.dallas.tx.us
http://www.simplesystems.org/users/bfriesen