Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: <filtered@awaresystems.be>
Received: from mx5.public.one.com ([10.246.18.25])
	by mail6.local.one.com (Dovecot) with LMTP id 5HWuMjpSrVT6wwAAsyOMew
	for <filtered@awaresystems.be>; Wed, 07 Jan 2015 15:38:16 +0000
Received: from mail-la0-f50.google.com (unknown [209.85.215.50])
	by mx5.public.one.com (Halon Mail Gateway) with ESMTP
	for <filtered@awaresystems.be>; Wed,  7 Jan 2015 15:38:15 +0000 (UTC)
Received: by mail-la0-f50.google.com with SMTP id pn19so4218093lab.9
        for <filtered@awaresystems.be>; Wed, 07 Jan 2015 07:38:13 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-original-authentication-results:delivered-to:delivered-to:date
         :from:to:in-reply-to:message-id:references:user-agent:mime-version
         :cc:subject:precedence:list-id:list-unsubscribe:list-archive
         :list-post:list-help:list-subscribe:content-type
         :content-transfer-encoding:sender:errors-to;
        bh=CmfhbUD/IoT+8/71bOZk2S6UU2UE+tdOKWpm5R+tqsI=;
        b=ayzUYAejE8RIu1LoZrWstFPkvrbLNoH3NHzAyZjWBS6pRkXrDRQOAXqHRnXVvUfRPn
         t1tsDCOqAKjxAs2IPcO862P8PIeBPDheyWSYYhMpUL8wJDTdwlbxXuS+OhWXdel4OlKy
         Kkj5hFoQDdnyAzky1D++158go9ehrnnMyKYMVuk1LMTSw9QXmOzXZrTQzxqKaYZZZE6o
         gVwu+uuG10qMV48MEV2yuBXAIwOCpTdQa4TzOOUOjb5YLo5uHUvRMHfBVtKvErMeJnS3
         p5Fk99fw5oN+poJybUO3tUROalq+5gI9keeq3ueJOyqi7DS8wmg5iVPhhz6AGCgAE7vb
         Xeyg==
X-Original-Authentication-Results: mx.google.com;       spf=none (google.com: tiff-bounces@lists.maptools.org does not designate permitted sender hosts) smtp.mail=tiff-bounces@lists.maptools.org
X-Received: by 10.152.206.108 with SMTP id ln12mr5551658lac.3.1420644648258;
        Wed, 07 Jan 2015 07:30:48 -0800 (PST)
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.114.181.147 with SMTP id dw19csp4220924ldc;
        Wed, 7 Jan 2015 07:30:47 -0800 (PST)
X-Received: by 10.112.162.226 with SMTP id yd2mr5554440lbb.1.1420644644947;
        Wed, 07 Jan 2015 07:30:44 -0800 (PST)
Authentication-Results: mx.google.com;
       spf=none (google.com: tiff-bounces@lists.maptools.org does not designate permitted sender hosts) smtp.mail=tiff-bounces@lists.maptools.org
Received-SPF: none (google.com: tiff-bounces@lists.maptools.org does not designate permitted sender hosts) client-ip=94.23.4.142;
Received: by 10.112.34.140 with POP3 id z12mf1346932lbi.38;
        Wed, 07 Jan 2015 07:30:44 -0800 (PST)
X-Gmail-Fetch-Info: info@awaresystems.be 1 pop.awaresystems.be 110 info@awaresystems.be
Return-Path: <tiff-bounces@lists.maptools.org>
Delivered-To: <info@awaresystems.be>
Received: from mx7.public.one.com ([10.246.18.27])
	by mail6.local.one.com (Dovecot) with LMTP id bcKuGl1NrVQI3AEAsyOMew
	for <info@awaresystems.be>; Wed, 07 Jan 2015 15:27:54 +0000
X-HalOne-ID: 32212851-9683-11e4-a47f-b82a72d82f61
Received: from lists.maptools.org (unknown [94.23.4.142])
	by mx7.public.one.com (Halon Mail Gateway) with ESMTP
	for <info@awaresystems.be>; Wed,  7 Jan 2015 15:27:51 +0000 (UTC)
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id 28ABE35C068;
	Wed,  7 Jan 2015 10:26:59 -0500 (EST)
Received: from blade.simplesystems.org (blade.simplesystems.org [65.66.246.74])
	by lists.maptools.org (Postfix) with ESMTPS id B2FCB35C027
	for <tiff@lists.maptools.org>; Wed,  7 Jan 2015 10:25:58 -0500 (EST)
Received: from freddy.simplesystems.org (freddy.simplesystems.org
	[65.66.246.65])
	by blade.simplesystems.org (8.14.4+Sun/8.14.4) with ESMTP id
	t07FQ1NO020659; Wed, 7 Jan 2015 09:26:02 -0600 (CST)
Date: Wed, 7 Jan 2015 09:26:01 -0600 (CST)
From: Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
X-X-Sender: bfriesen@freddy.simplesystems.org
To: Roger Leigh <rleigh@codelibre.net>
In-Reply-To: <20150107105315.GD23934@codelibre.net>
Message-ID: <alpine.GSO.2.01.1501070921490.18732@freddy.simplesystems.org>
References: <alpine.GSO.2.01.1501011102040.18732@freddy.simplesystems.org>
	<CAK8GPyAfmhtC3OaokrkAuLX75iWfDCHnhPS+sjyyZvFE=N6w5A@mail.gmail.com>
	<56071.99.237.145.54.1420262656.squirrel@www.sidefx.com>
	<CAK8GPyA_--nXP7tn5tK3=XnLfXQGE7+BQGmkU54Xs1R2QpW5QA@mail.gmail.com>
	<CAK8GPyC7M6DuLMtG_UtadsurUvEMbFagSx0BD1aBZjjaJa2i6Q@mail.gmail.com>
	<alpine.GSO.2.01.1501042246490.18732@freddy.simplesystems.org>
	<CAK8GPyAoJDi8cisMeg1O6F5bo-LSq6=N==16BwE7PzB7iWHnyg@mail.gmail.com>
	<CAK8GPyB2oJU-B7E_EB+_zTQvc7R6kq9ge3JiqHjP85JP8WH1Dw@mail.gmail.com>
	<CAK8GPyAGPMTodQg0LWzekHFaRmOPUgoFUHaefhbwViR2D=+3ZA@mail.gmail.com>
	<alpine.GSO.2.01.1501050852340.18732@freddy.simplesystems.org>
	<20150107105315.GD23934@codelibre.net>
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]);
	Wed, 07 Jan 2015 09:26:02 -0600 (CST)
Cc: TIFF mailing list <tiff@lists.maptools.org>
Subject: Re: [Tiff] Fast TIFF Reading on Windows
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 Wed, 7 Jan 2015, Roger Leigh wrote:
>
> The major annoyance is the use of a global error handler which precludes
> the multiple callers being able to accurately report errors.  I know the
> use of a mutex is a bit of a blunt instrument, but it's needed to save
> and restore the error handler and throw exceptions correctly in the
> calling thread.  If libtiff could make the error reporting use thread-
> local structures, that would avoid the need to have threads contending
> on a mutex or other synchronisation primitive just to get an error
> message.  If it was also thread-safe internally that would also be a
> huge improvement.

It is unfortunate that the global error handler was not fixed by 
4.0.X.  As a work-around, you can use thread-specific storage, which 
is supported by both POSIX threads and WIN32.  GraphicsMagick uses 
thread specific storage to make the libtiff error reporting 
thread-safe.

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/
