Re: uv3 iterators - success in avoiding all concurrent modification exceptions

2016-09-16 Thread Marshall Schor
re: remove the need for the snapshot iterators then? Yes, mostly. There's one other use for those iterators, I think - they can in unusual circumstances, speed things up (but mostly, they slow things down a little). The speed up happens if you're doing a fully sorted index with lots of subtypes

Re: uv3 iterators - success in avoiding all concurrent modification exceptions

2016-09-16 Thread Richard Eckart de Castilho
On 16.09.2016, at 22:06, Marshall Schor wrote: > >>> Does this seem like a good thing to try? Definitely sounds promising. So that would remove the need for the snapshot iterators then? Cheers, -- Richard

Re: uv3 iterators - success in avoiding all concurrent modification exceptions

2016-09-16 Thread Marshall Schor
One other benefit: UIMA automatically may "under-the-covers" remove and add back some FSs if you update some features used as keys in indexes. This could cause ConcurrentModificationException if you had loops that did this, even though you had no index operations coded explicitly as part of the

Re: uv3 iterators - success in avoiding all concurrent modification exceptions

2016-09-16 Thread Marshall Schor
As an experiment, I implemented a copy-on-write style of concurrent modification exception prevention in UV3. It does minimal copying, only copying part of the index related to the particular type being updated; if no iterators are in use, there's no copying (but see below). The copy is done