[fdo-internals] RE: SDF feature reader
Haris Kurtagic
haris at sl-king.com
Wed Aug 13 14:51:46 EDT 2008
I haven't looked that carefully into GetString but it looks that
BinaryReader do some string buffering.
Anyhow, I am talking now only about single thread use with multiple
feature readers.
Threading is not issue for that case.
Also, I would like to understand why SDF provider is not thread safe and
to look into possibilities
I think that sqlite version used with SDF allows thread safe access.
Thank you for your help,
Haris
From: fdo-internals-bounces at lists.osgeo.org
[mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Gavin Cramer
Sent: Wednesday, August 13, 2008 8:23 PM
To: FDO Internals Mail List
Subject: [fdo-internals] RE: SDF feature reader
Yes. The particular problem that you are seeing can also happen with
String values, since the pointer returned by GetString is to a buffer
owned by the reader. Per-connection threading for any provider (that
supports this kind of threading, as determined by
FdoIConnectionCapabilities::GetThreadCapability) is the way to go.
Gavin
From: fdo-internals-bounces at lists.osgeo.org
[mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Badreddine
Karoui
Sent: Wednesday, August 13, 2008 2:18 PM
To: FDO Internals Mail List
Subject: [fdo-internals] RE: SDF feature reader
The SDF provider is per connection threaded which means only one thread
can access a reader at a time. You can have many threads using their own
connections/readers at the same time.
Badreddine
From: fdo-internals-bounces at lists.osgeo.org
[mailto:fdo-internals-bounces at lists.osgeo.org] On Behalf Of Haris
Kurtagic
Sent: Wednesday, August 13, 2008 2:29 PM
To: FDO Internals Mail List
Subject: [fdo-internals] SDF feature reader
Hi,
I have issue when when more than one feature reader is created against
same SDF connection
It looks like same buffer ( created by sqlite cursor ) is shared betwean
feature readers.
This will cause that data returned from feature reader with function
GetGeometry will be corrupted when another reader is used.
Is this a bug or I am not looking into it correctly ?
I would like to be able to use multi thread access to sqlite database.
If I am right, SDF provider is not "thread safe" ? if so, what are main
reasons for it ?
Thank you,
Haris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/fdo-internals/attachments/20080813/512dcb23/attachment-0001.html
More information about the fdo-internals
mailing list