Hi Jürgen and Nathan,

On Fre 22 Mär 2013 18:00:14 CET, Jürgen E. Fischer wrote:
> Hi Nathan,
> (... snip )
> The bug is that the providers have a notion of active iterators.  The 
> iterators
> should be independent, but currently aren't.   I think that's going to change
> when threading is introduced - we are just not there yet.   If the iterators
> were independent updateFeature would work fine.
>
>
> Jürgen
>

While these technical restrictions have not so beauty effects (one 
would not guess and has no idea that updateFeature is unreliable when 
used in an iterator loop) I think such problems will pop up at one end 
or another in the upcoming months, even more when multithreading is 
introduced, but not all dataProviders are ready to play nice and allow 
multiple iterators run in parallel. What do you think about introducing 
exceptions being thrown in such cases? It would be easier to become 
aware and also to react to such problems.
There can also be conditions, when the underlying data is edited while 
being iterated. I remember Java had something called fail-safe and 
fail-fast iterators, which might be worth revising for this case.

Concerning the current issue: If there is really no possibility to fix 
this without parallel iterators, at least the API should give a hint on 
these restrictions.
_______________________________________________
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to