<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<blockquote
 cite="mid:477287699-1191692698-cardhu_decombobulator_blackberry.rim.net-1972171391-@bxe022.bisx.prod.on.blackberry"
 type="cite">
  <pre wrap="">What about methods that modify a layer? i.e. we have two threads, A and 
B accessing the same layer via layer clones, so they each have their own 
read state. What if thread A checks to see if a feature with FID 42 
exists, then B invokes a method to delete feature 42, before thread B 
attempts to get the geometry for that feature? Even if those calls are 
serialized, it is likely that thread A will get very confused.
  </pre>
</blockquote>
<br>
Doh! Managed to screw up my example... This should read:<br>
<br>
<pre wrap="">"What about methods that modify a layer? i.e. we have two threads, A and 
B accessing the same layer via layer clones, so they each have their own 
read state. What if thread A checks to see if a feature with FID 42 
exists, then B invokes a method to delete feature 42, before thread <b>A</b> 
attempts to get the geometry for that feature? Even if those calls are 
serialized, it is likely that thread A will get very confused."</pre>
<br>
Cheers,<br>
<br>
Sy<br>
<br>
<br>
<blockquote
 cite="mid:477287699-1191692698-cardhu_decombobulator_blackberry.rim.net-1972171391-@bxe022.bisx.prod.on.blackberry"
 type="cite">
  <pre wrap="">
I think in general, guaranteeing thread safety when you have threads 
modifying data is in general extremely hard at the library level, and 
really requires some kind of thread coordination at the application 
program level. Maybe the datasource mutex could be exposed with a couple 
of handy Lock/Unlock methods to make this kind of high level 
coordination easier? In any case, shouldn't the RFC mention something 
about reading vs writing?

Cheers,

Simon


Frank Warmerdam wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Motion: To adopt RFC 16: OGR Thread Safety

<a class="moz-txt-link-freetext" href="http://trac.osgeo.org/gdal/wiki/rfc16_ogr_reentrancy">http://trac.osgeo.org/gdal/wiki/rfc16_ogr_reentrancy</a>

---

There wasn't to much discussion on this as far as I recall, which I take
to mean no one has a problem with it.  So moving to formal vote so I can
implement this coming week.

+1 from me.

Best regards,
    </pre>
  </blockquote>
  <pre wrap=""><!---->
_______________________________________________
Gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Gdal-dev@lists.maptools.org">Gdal-dev@lists.maptools.org</a>
<a class="moz-txt-link-freetext" href="http://lists.maptools.org/mailman/listinfo/gdal-dev">http://lists.maptools.org/mailman/listinfo/gdal-dev</a>
  </pre>
</blockquote>
<br>
</body>
</html>