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 C3A6640013C
	for <info@awaresystems.be>; Thu,  5 May 2011 22:40:02 +0200 (CEST)
Received: by mx-q.b-one.net (Postfix, from userid 106)
	id B734673BA64; Thu,  5 May 2011 22:39:30 +0200 (CEST)
X-Virus-Scanned: by one.com
X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "MIME-Version"
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 3A86378B21A for
 <info@awaresystems.be>; Thu,  5 May 2011 22:39:27 +0200 (CEST)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by
 lists.maptools.org (Postfix) with ESMTP id 6643C86DC8; Thu,  5 May 2011
 15:37:17 -0500 (EST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com
 [74.125.82.172]) by lists.maptools.org (Postfix) with ESMTPS id 7200D86DD5
 for <tiff@lists.maptools.org>; Thu,  5 May 2011 15:12:29 -0500 (EST)
Received: by wyb29 with SMTP id 29so1985973wyb.3 for
 <tiff@lists.maptools.org>; Thu, 05 May 2011 13:12:28 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.216.59.81 with SMTP id r59mr1750819wec.40.1304625562255; Thu,
 05 May 2011 12:59:22 -0700 (PDT)
Received: by 10.216.12.65 with HTTP; Thu, 5 May 2011 12:59:22 -0700 (PDT)
In-Reply-To: <4DC2F483.7040506@pobox.com>
References: <BANLkTimakuNLfthR-C+uYy+mJHm7ug54WQ@mail.gmail.com>
 <4DC2E179.7050309@pobox.com>
 <BANLkTinxtiRkJtq+7chXBwKSxikRaN9VgA@mail.gmail.com>
 <4DC2F483.7040506@pobox.com>
Date: Thu, 5 May 2011 15:59:22 -0400
Message-ID: <BANLkTim_wCJGOpkZuV94yg8X2emhBVug2Q@mail.gmail.com>
From: Katerina Sedivy <sedivyk@gmail.com>
To: Frank Warmerdam <warmerdam@pobox.com>, bfriesen@simple.dallas.tx.us, 
 tiff@lists.maptools.org
Subject: Re: [Tiff] Is LibTiff 3.9.5 Thread Safe ?
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: multipart/mixed; boundary="===============1714203678=="
Mime-version: 1.0
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

--===============1714203678==
Content-Type: multipart/alternative; boundary=000e0cdff82234187c04a28ccfa6

--000e0cdff82234187c04a28ccfa6
Content-Type: text/plain; charset=ISO-8859-1

Sorry I did not do a reply to all  ...

Frank,

Thank you for your response. So you say that you use the TIFFGetField() in a
multithread environement on multiple tiffs and it always returns the correct
values for the bits per sample flag ? You do not do anything special like
Bob said about the exercising ?


Thanks,
Katerina

On Thu, May 5, 2011 at 3:03 PM, Frank Warmerdam <warmerdam@pobox.com> wrote:

> On 11-05-05 02:38 PM, Katerina Sedivy wrote:
>
>> Let me try to explain myself better.. I have 3 folders with multiple tiff
>> files. Each thread reads tiff files from a different folder therefore the
>> same
>> tiff file is never opened by 2 threads at the same time.
>>
>> Thread1 reads tiff files from folder  Tiffs1
>> Thread2 reads tiff files from folder  Tiffs2
>> Thread3 reads tiff files from folder  Tiffs3
>>
>> So I would have assumed that TIFFGetField is alway executed on a different
>> TIFF
>> object since I open a different tiff file handle each time before calling
>> TIFFGetField . The handle to the tiff returned by TiffOpen is a local var
>> in
>> the execute function of the thread therefore it is not one file handle per
>> thread but rather one file handle per TIFF.
>>
>
> Katerina,
>
> Ah, this should work fine.  There is always the possibility of a
> thread safety issues somewhere in the code which might need to be fixed
> but I assume this approach is fine and use it myself without apparent
> problems.
>
> Sorry for misunderstanding.
>
>
> Best regards,
> --
>
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam,
> warmerdam@pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | Geospatial Programmer for Rent
>
>

--000e0cdff82234187c04a28ccfa6
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Sorry I did not do a reply to all=A0 ...<br><br>Frank, <br><br>Thank you fo=
r your response. So you say that you use the TIFFGetField() in a multithrea=
d environement on multiple tiffs and it always returns the correct values f=
or the bits per sample flag ? You do not do anything special like Bob said =
about the exercising ? <br>
<br><br>Thanks,<br>Katerina<br><br><div class=3D"gmail_quote">On Thu, May 5=
, 2011 at 3:03 PM, Frank Warmerdam <span dir=3D"ltr">&lt;<a href=3D"mailto:=
warmerdam@pobox.com">warmerdam@pobox.com</a>&gt;</span> wrote:<br><blockquo=
te class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, 204, 204)=
; margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class=3D"im">On 11-05-05 02:38 PM, Katerina Sedivy wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Let me try to explain myself better.. I have 3 folders with multiple tiff<b=
r>
files. Each thread reads tiff files from a different folder therefore the s=
ame<br>
tiff file is never opened by 2 threads at the same time.<br>
<br>
Thread1 reads tiff files from folder =A0Tiffs1<br>
Thread2 reads tiff files from folder =A0Tiffs2<br>
Thread3 reads tiff files from folder =A0Tiffs3<br>
<br>
So I would have assumed that TIFFGetField is alway executed on a different =
TIFF<br>
object since I open a different tiff file handle each time before calling<b=
r>
TIFFGetField . The handle to the tiff returned by TiffOpen is a local var i=
n<br>
the execute function of the thread therefore it is not one file handle per<=
br>
thread but rather one file handle per TIFF.<br>
</blockquote>
<br></div>
Katerina,<br>
<br>
Ah, this should work fine. =A0There is always the possibility of a<br>
thread safety issues somewhere in the code which might need to be fixed<br>
but I assume this approach is fine and use it myself without apparent<br>
problems.<br>
<br>
Sorry for misunderstanding.<div><div></div><div class=3D"h5"><br>
<br>
Best regards,<br>
-- <br>
---------------------------------------+-----------------------------------=
---<br>
I set the clouds in motion - turn up =A0 | Frank Warmerdam, <a href=3D"mail=
to:warmerdam@pobox.com" target=3D"_blank">warmerdam@pobox.com</a><br>
light and sound - activate the windows | <a href=3D"http://pobox.com/%7Ewar=
merdam" target=3D"_blank">http://pobox.com/~warmerdam</a><br>
and watch the world go round - Rush =A0 =A0| Geospatial Programmer for Rent=
<br>
<br>
</div></div></blockquote></div><br>

--000e0cdff82234187c04a28ccfa6--

--===============1714203678==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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