Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-k.b-one.net (mx-k.one.com [91.198.169.58])
	by mail9.b-one.net (Postfix) with ESMTP id 99A8040024F
	for <info@awaresystems.be>; Thu, 17 Jun 2010 21:02:52 +0200 (CEST)
Received: by mx-k.b-one.net (Postfix, from userid 106)
	id 8F3051857C16; Thu, 17 Jun 2010 21:02:52 +0200 (CEST)
X-Virus-Scanned: by one.com
X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4
Received: from lists.maptools.org (lists.maptools.org [65.39.174.144]) by
 mx-k.b-one.net (Postfix) with ESMTP id A9EF31857C16 for
 <info@awaresystems.be>; Thu, 17 Jun 2010 21:02:51 +0200 (CEST)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by
 lists.maptools.org (Postfix) with ESMTP id D51111D18E11A; Thu, 17 Jun 2010
 14:02:16 -0500 (EST)
Received: from blade.simplesystems.org (blade.simplesystems.org
 [65.66.246.74]) by lists.maptools.org (Postfix) with ESMTPS id 1CCA21D18E501
 for <tiff@lists.maptools.org>; Thu, 17 Jun 2010 13:47:40 -0500 (EST)
Received: from freddy.simplesystems.org (freddy.simplesystems.org
 [65.66.246.65]) by blade.simplesystems.org (8.13.8+Sun/8.13.8) with ESMTP id
 o5HIldsG018040; Thu, 17 Jun 2010 13:47:39 -0500 (CDT)
Date: Thu, 17 Jun 2010 13:47:38 -0500 (CDT)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@freddy.simplesystems.org
To: Adam Goode <adam@spicenitz.org>
In-Reply-To: <4C1A64CF.2060607@spicenitz.org>
Message-ID: <alpine.GSO.2.01.1006171326540.12887@freddy.simplesystems.org>
References: <4C1A41A5.4070409@spicenitz.org>
 <alpine.GSO.2.01.1006171125140.12887@freddy.simplesystems.org>
 <4C1A4E8A.1060904@spicenitz.org>
 <alpine.GSO.2.01.1006171150230.12887@freddy.simplesystems.org>
 <4C1A5840.5000300@spicenitz.org>
 <AANLkTing-04iFpEr0k9-6DaA7DQFTRrFjOjdQ5g2RXM0@mail.gmail.com>
 <4C1A64CF.2060607@spicenitz.org>
User-Agent: Alpine 2.01 (GSO 1266 2009-07-14)
MIME-Version: 1.0
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2
 (blade.simplesystems.org [65.66.246.90]); Thu, 17 Jun 2010 13:47:39 -0500
 (CDT)
Cc: Tiff List <tiff@lists.maptools.org>
Subject: Re: [Tiff] libtiff 4 API/ABI stability?
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
 <mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
 <mailto:tiff-request@lists.maptools.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

On Thu, 17 Jun 2010, Adam Goode wrote:
>
> Yeah, it will work ok in 99% of cases. It won't work if one library
> needs to register a codec that changes the behavior of another library,
> for example. Not so much an issue if you're using libtiff from an
> application, but it is if you're writing a library that uses libtiff.

In this case you would need to have an 'application' handle which 
contains all application specific references, where a single "program" 
could have multiple handles.  Multiple users of libtiff in a single 
application becomes more common as applications become huge and use 
many other libraries (some apps seem to use over 70 libraries now).

I have seen very good success from using thread specific data (TSD), 
which is supported under POSIX and Microsoft Windows, and is easily 
emulated in a non-threaded build.  TSD can be much more efficient than 
using shared data with locking if the algorithm can get by with 
different data per thread.  There are also TSD compiler extensions for 
GCC and MSVC but I would not want to use something non-portable like 
that.

Regardless, only minor API changes/improvements should be expected 
from 4.0.

Bob
-- 
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
