<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Simon,</p>
<p>I don't think that killing a thread is a safe practice in
general. It would likely result in memory leaks and maybe in some
other inconsistent state that could crash the whole process. An
interesting enhancement for such cases would be to be able to
provide a progress / abort callback.</p>
<p>Even<br>
</p>
<div class="moz-cite-prefix">Le 28/07/2021 à 21:22, Simon Eves a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CAJf0KTRsaskSOsPv8tbA+iTB+TqL_ui5y4n05WGLDw_3guRs4w@mail.gmail.com">
<div dir="ltr">Dear All,
<div><br>
</div>
<div>I am aware that some improvements were made in the 2.3
timeframe with regards to dealing with large GeoJSON files,
although even in 3.2, it's still very slow and memory hungry.<br>
<div><br>
</div>
<div>Our system allows for aborting imports, but this only
works reliably once it has actually got to the stage of
reading features from the file. With the GeoJSON, it just
sits in the GDALOpenEx call for ages.</div>
<div><br>
</div>
<div>My question, therefore, is whether it might be practical
to run the GDALOpenEx in a separate thread with a future to
return the resulting handle, such that it could be monitored
and killed if necessary?</div>
<div><br>
</div>
<div>Mainly I would be concerned that killing the thread might
trash some global GDAL state that might then not be
recoverable, or that the open relies on some TLS for the
process thread and therefore might not work properly.</div>
<div><br>
</div>
<div>We're going to try it anyway, but opinions welcomed,
thanks!</div>
<div><br>
</div>
<div>Simon</div>
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div>
<div>
<div>
<div dir="ltr"><span>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<table>
<tbody>
<tr>
<td>
<table>
<tbody>
<tr>
<td><a
href="http://www.omnisci.com/"
target="_blank" moz-do-not-send="true"><img moz-do-not-send="true"></a><br>
</td>
<td>
<table>
<tbody>
<tr>
<td><span><span>Simon
Eves</span></span></td>
</tr>
<tr>
<td>
<table>
<tbody>
<tr>
<td><span>Senior
Graphics
Engineer,
Rendering
Group<br>
100 Montgomery
St (5th
Floor), San
Francisco, CA
94104, USA<br>
</span></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td>
<table>
<tbody>
<tr>
<td><br>
</td>
<td><br>
</td>
</tr>
<tr>
<td><span>Email: <a
href="mailto:simon.eves@omnisci.com" target="_blank"
moz-do-not-send="true">simon.eves@omnisci.com</a> |
Cell: </span></td>
<td><span>+1
(415) 902-1996</span></td>
</tr>
</tbody>
</table>
<br>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>