imglib / imglib2-cache

Cache interfaces and java.lang.ref based implementation.
Other
6 stars 4 forks source link

concurrency exception #15

Closed NicoKiaru closed 4 years ago

NicoKiaru commented 4 years ago

I sometime get a java.util.concurrent.ExecutionException when I get several spimsources in parallel in https://github.com/imglib/imglib2-cache/blob/master/src/main/java/net/imglib2/cache/util/CacheAsUncheckedCacheAdapter.java

The error message is:

java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Hook previously registered
    at net.imglib2.cache.util.CacheAsUncheckedCacheAdapter.get(CacheAsUncheckedCacheAdapter.java:45)
    at bdv.AbstractSpimSource.getSource(AbstractSpimSource.java:230)
    at bdv.AbstractSpimSource.getSource(AbstractSpimSource.java:222)
tpietzsch commented 4 years ago

@NicoKiaru I hope this is fixed by https://github.com/imglib/imglib2-cache/commit/0cb00d72d24cbb8e2b54cbbaabb79135803db56f