Closed haraldsteinlechner closed 8 years ago
nothing helps here, it is very common that GC destroys all kinds of mutable state. Either more locking or less finalizers
6845501343a16ab1503ab50da77d59644843e88e at elast symptomatically solves some issues. firstly, remove shall only decrement readers count if the reader is a valid reader (and can thus be counted). Secondly, via finalizers, remove calls can be unsynchronized, therefore the additional (possibly nested) lock in local remove. Thirdly, MutableVolatileDirtySet now performs eval on a copy. This is not totally threadsafe but at least does not produce lost updates (eventually).
Should be working right now...
Test in aardvark.base.incremental.tests
in Remove:
Seq.exactlyOne fails because of concurrent modification on readers if remove is called concurrently by the GC. For the moment i disabled the check and stay in non-pass-through