Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx4.public.one.com ([10.246.18.24])
	by mail6.local.one.com (Dovecot) with LMTP id WCdZAPA5XVlDCgAAsyOMew
	for <filtered@awaresystems.be>; Wed, 05 Jul 2017 19:20:57 +0000
X-HalOne-ID: 1147ac05-61b7-11e7-9abf-b82a72d0454d
Received: from mail-oi0-f46.google.com (unknown [209.85.218.46])
	by mx4.public.one.com (Halon) with ESMTPS
	id 1147ac05-61b7-11e7-9abf-b82a72d0454d;
	Wed, 05 Jul 2017 19:20:56 +0000 (UTC)
Received: by mail-oi0-f46.google.com with SMTP id x187so76442507oig.3
        for <filtered@awaresystems.be>; Wed, 05 Jul 2017 12:20:56 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-original-authentication-results:x-gm-message-state:delivered-to
         :message-id:date:from:user-agent:mime-version:cc:references
         :in-reply-to:subject:precedence:list-id:list-unsubscribe
         :list-archive:list-post:list-help:list-subscribe
         :content-transfer-encoding:sender:errors-to;
        bh=0UxfOM2+nfrBX836fHHvaG0Hr95YDayeCzbQ9MVPw7o=;
        b=f1vxl0MLRGoZKod+G33Tr1VFzi9TJdT+OuNcGciGMsXCmplN2kzqkiyVsYiOrmilkx
         KvnkeyT+kQ4ci1klQEpvVRnfwpUAq80AxBZdi/0HXwLUkaR2lk7mKc94fwB2HA7q4+t/
         3S4heREdbGY5HilN2LiSUF7eAhXYyOCvNL79M/L+AfvLwP7AJ0xUhWL32SZ5ffAt5va0
         0R1MRAY/ZCTTQEMWCzWkFAOnY6nsF5rmB4nIWldPWuGqgK5kwXqZHrFw3VmrWTlbhjJa
         jOb7zVKVsrw1Cl2nZpJaM3Wp0Hr6UaZ31O9ZcQOBWztA86lL8NMtyh9hdMBNVCgJCOeV
         a8dA==
X-Original-Authentication-Results: mx.google.com;       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org
X-Gm-Message-State: AKS2vOwSr5aVzc97DWa7VjTFZpHEqsG5vw+u2SlK6BjJge6o2BIvpwGx
	yOZVA3+npfdtJc6SVPd1GIWZi81nIU2H10v8FDQKWA==
X-Received: by 10.202.65.9 with SMTP id o9mr24420761oia.134.1499282455072;
        Wed, 05 Jul 2017 12:20:55 -0700 (PDT)
X-Forwarded-To: filtered@awaresystems.be
X-Forwarded-For: awaresystems.be@gmail.com filtered@awaresystems.be
Delivered-To: awaresystems.be@gmail.com
Received: by 10.202.64.84 with SMTP id n81csp1150797oia;
        Wed, 5 Jul 2017 12:20:54 -0700 (PDT)
X-Received: by 10.223.176.133 with SMTP id i5mr40714133wra.53.1499282453984;
        Wed, 05 Jul 2017 12:20:53 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1499282453; cv=none;
        d=google.com; s=arc-20160816;
        b=jPjWYN2sCShkVvJfbRxGI3ChSXFerAcPKccjaUk7+J9ccIfa2nkVGqipsDF0ayBeWM
         P8O2sOyYekrtXV+5KlRMUlCfKhNrIZOb8D6eTGvXOGSmkP5ZznuYrp8Hij0L+GmQoNSL
         LEtYab5eVMQbLn6XUs4Kp9M/aYovVhjItPgkU1ZSxF90jj4NQhEUexur4iDjE7EQLxI9
         vbA2xdYi8BP+9yfbYERjcaLKfH1tgS1xAXNqzVkOLcVbGgTT/4V6qKn4GzNKjkV131EV
         mEfZ7qjsQu94dZ5b6u2YulY4pXDW+5ltLoHnokeaKrfaXNMcnaIGp64R9F0l/zjmWOHx
         zv5w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help
         :list-post:list-archive:list-unsubscribe:list-id:precedence:subject
         :in-reply-to:references:cc:mime-version:user-agent:from:date
         :message-id:arc-authentication-results;
        bh=0UxfOM2+nfrBX836fHHvaG0Hr95YDayeCzbQ9MVPw7o=;
        b=aD7g9ViAwlPDzzj6IKHOoRB8dq6Pp7H1QDHrRPgsu5x7DyE1cdo2N/Eo9NYKPdy4Ua
         EKArLfS9anX4HPNzIqca8o3cuqqjS329SuqimekGo5QsouRtKnFs+pOwkS7GpkZ2k8MM
         I1tebZnrCZsXC0oSsz/K2U91zigmDa2fQ2eKjj2XHHu9VIpgqkRqCkagr2FMVeNuZXoc
         AgrhdWLcLS8+z9F5QPfkVfYbbhSFs4WfTtqhkFDCEeJaRm4KsETulSwqm+kmy4jYsh/s
         fOobw//+X13PDbEm26d+FBIDsq3oy5MZA5+tMwhKmmtmPh/TTQufe3WfnXlRvQbrIFWe
         /PyA==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org
Return-Path: <tiff-bounces@lists.maptools.org>
Received: from lists.maptools.org (ks365428.kimsufi.com. [94.23.4.142])
        by mx.google.com with ESMTP id 138si3812711wmg.57.2017.07.05.12.20.53;
        Wed, 05 Jul 2017 12:20:53 -0700 (PDT)
Received-SPF: neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) client-ip=94.23.4.142;
Authentication-Results: mx.google.com;
       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id A0C7F35C074;
	Wed,  5 Jul 2017 14:19:49 -0500 (EST)
Received: from polaris.osa.pri.ee (osa.pri.ee [213.219.84.188])
	by lists.maptools.org (Postfix) with ESMTP id 8AD4535C024
	for <tiff@lists.maptools.org>; Wed,  5 Jul 2017 13:52:12 -0500 (EST)
Received: from localhost (localhost [127.0.0.1])
	by polaris.osa.pri.ee (Postfix) with ESMTP id 9EA676E69A
	for <tiff@lists.maptools.org>; Wed,  5 Jul 2017 21:52:11 +0300 (EEST)
X-Virus-Scanned: amavisd-new at osa.pri.ee
Received: from polaris.osa.pri.ee ([127.0.0.1])
	by localhost (osa.pri.ee [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 14uKQanXLJUN for <tiff@lists.maptools.org>;
	Wed,  5 Jul 2017 21:51:19 +0300 (EEST)
Received: from [192.168.1.208] (10-170-190-90.dyn.estpak.ee [90.190.170.10])
	(using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))
	(Client did not present a certificate)
	by polaris.osa.pri.ee (Postfix) with ESMTPSA id 83C0F6E652
	for <tiff@lists.maptools.org>; Wed,  5 Jul 2017 21:51:19 +0300 (EEST)
Message-ID: <595D3526.5060408@osa.pri.ee>
Date: Wed, 05 Jul 2017 21:51:18 +0300
From: Paavo Helde <paavo@osa.pri.ee>
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64;
	rv:25.8) Gecko/20151117 FossaMail/25.1.9
MIME-Version: 1.0
CC: TIFF mailing list <tiff@lists.maptools.org>
References: <alpine.GSO.2.20.1705211423410.6623@freddy.simplesystems.org>
	<595B7643.5040000@osa.pri.ee> <15146403.Hy9LK3uOdm@even-i700>
	<595B8A52.2050603@osa.pri.ee>
	<alpine.GSO.2.20.1707041336160.14951@freddy.simplesystems.org>
	<80e1053d-8b1a-934e-025b-008fc750cc3b@sidefx.com>
	<CAAcuQeZAkmmRKMp5HbBi1Lr58LzFUMuenw_afHcOPOhZSA6ZJg@mail.gmail.com>
	<595CF066.2060605@osa.pri.ee>
	<CAAcuQeZrny_nQu+SUbmsf3HMvs4EON90zZuDOHi7z9TFC_qDRQ@mail.gmail.com>
In-Reply-To: <CAAcuQeZrny_nQu+SUbmsf3HMvs4EON90zZuDOHi7z9TFC_qDRQ@mail.gmail.com>
Subject: Re: [Tiff] A bug in libtiff error/warning handling
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 5.07.2017 18:02, Olivier Paquet wrote:
> The other thing to be decided is if we want to push the idea further 
> to have a library handle so we can also fix TIFFRegisterCODEC(), 
> TIFFSetTagExtender(), etc. Such a handle could hold all currently 
> global data and would be given to the new TIFFOpen. A little more 
> complexity but also potentially a more complete long term fix.

Do you mean two-step initialization, e.g. first creating an "engine" or 
something, then using this to open TIFF files? That would be very nice 
design! Different libraries (or a single library for that matter) could 
then create multiple "engines" which would be totally independent. 
Future extensions could be added by new API functions which modify the 
engine object.

It should be clearly defined if and how this engine can be accessed from 
multiple threads. If it can, then it must not require any external or 
internal locking when processing the actual TIFF files - if the client 
wants to read or write 20 different TIFF files in parallel, the library 
should support that. Probably the simplest way to achieve that is to 
require that the client does not access the engine in other threads when 
calling mutator methods like TIFFRegisterCODEC().

Paavo


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