concurrent-unique-queue icon indicating copy to clipboard operation
concurrent-unique-queue copied to clipboard

ConcurrentModifications exceptions

Open martinrosstmc opened this issue 7 years ago • 1 comments

Hi,

I'm getting ConcurrentModificationExceptions while attempting to use two threads to put/take from the queue. I do have a question around locking. There are takeLock's and putLock's... But I don't see how the locking preventing the LinkedHashSet from having these concurrent since they put doesn't check takeLock and viceVersa.

martinrosstmc avatar Jun 25 '18 16:06 martinrosstmc

Yeah there is a bug, originally I wanted to avoid using a full lock for put, I'll publish a new version soon.

bvanalderweireldt avatar Apr 14 '19 23:04 bvanalderweireldt