[concurrency-interest] backport: ConcurrentModificationException with take() and contains()?

serwei serwei at gmail.com
Wed Apr 2 04:42:51 EDT 2008


Hi there,

is it a confirmed scenario where a ConcurrentModificationException
will happen when a DelayQueue.contains() is running and a
DelayQueue.take() happens then?

So I have to manually synchronized (something) for the two?

Thanks!

PS: stack below

java.util.ConcurrentModificationException
        at edu.emory.mathcs.backport.java.util.PriorityQueue$Itr.checkForComodification(PriorityQueue.java(Inlined
Compiled Code))
        at edu.emory.mathcs.backport.java.util.PriorityQueue$Itr.next(PriorityQueue.java(Compiled
Code))
        at edu.emory.mathcs.backport.java.util.concurrent.DelayQueue$Itr.next(DelayQueue.java(Compiled
Code))
        at java.util.AbstractCollection.contains(AbstractCollection.java(Compiled
Code))


More information about the Concurrency-interest mailing list