Return-Path: <tiff-bounces@lists.maptools.org>
X-Original-To: info@awaresystems.be
Delivered-To: info@awaresystems.be
Received: from mx-q.b-one.net (mx-q.one.com [91.198.169.248])
	by mail9.b-one.net (Postfix) with ESMTP id 26BC540024F
	for <info@awaresystems.be>; Thu, 17 Jun 2010 20:32:56 +0200 (CEST)
Received: by mx-q.b-one.net (Postfix, from userid 106)
	id 1C36D330083; Thu, 17 Jun 2010 20:32:56 +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-q.b-one.net (Postfix) with ESMTP id 331B1330083 for
 <info@awaresystems.be>; Thu, 17 Jun 2010 20:32:55 +0200 (CEST)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by
 lists.maptools.org (Postfix) with ESMTP id 6974D1D18E136; Thu, 17 Jun 2010
 13:31:52 -0500 (EST)
Received: from mail-fx0-f44.google.com (mail-fx0-f44.google.com
 [209.85.161.44]) by lists.maptools.org (Postfix) with ESMTP id 0C2BA1D0E5293
 for <tiff@lists.maptools.org>; Thu, 17 Jun 2010 13:04:02 -0500 (EST)
Received: by fxm19 with SMTP id 19so169180fxm.3 for
 <tiff@lists.maptools.org>; Thu, 17 Jun 2010 11:04:01 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.103.37.24 with SMTP id p24mr3605977muj.47.1276797840461; Thu,
  17 Jun 2010 11:04:00 -0700 (PDT)
Received: by 10.103.134.13 with HTTP; Thu, 17 Jun 2010 11:04:00 -0700 (PDT)
In-Reply-To: <4C1A5840.5000300@spicenitz.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>
Date: Thu, 17 Jun 2010 14:04:00 -0400
Message-ID: <AANLkTing-04iFpEr0k9-6DaA7DQFTRrFjOjdQ5g2RXM0@mail.gmail.com>
From: Olivier Paquet <olivier.paquet@gmail.com>
To: Adam Goode <adam@spicenitz.org>
Cc: 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="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

On Thu, Jun 17, 2010 at 1:15 PM, Adam Goode <adam@spicenitz.org> wrote:
> =A01. libtiff API (but not TIFF structures) is usable from multiple
> =A0 =A0threads at once.
[...]
> I say we aim for #1. This is important, not just for multiple threads,
> but for multiple unrelated functions accessing libtiff from the same
> memory space. In my library that uses libtiff (OpenSlide), I have to
> avoid setting the error/warning callbacks in case the application has
> changed them. I would like to be able to set these in my code without
> interfering with the application's intent.

Agreed. In fact, #1 is probably already assumed by many users of the
library. That's what we do anyway and it works out ok.

> Also, for globals, there is also codec registration.

A quick grep also reveals:

1) A few fields in tif_aux.c: TIFFVGetFieldDefaulted. These buffers
could be put in the TIFF structure itself.
2) A table in tif_luv.c: oog_encode(). In practice this can be fixed
well enough without locks.

> See my old mail for my idea:
> http://www.asmail.be/msg0054681986.html

Seems like a fairly good solution as far as the API is concerned. It
solves both multithread issues and multiple user issues. Is there an
entry in bugzilla to track all this?

Olivier
_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
