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

ConcurrentSetBlockingQueue.offer() should return true when element already exists

Open jruaux opened this issue 5 years ago • 0 comments

BlockingQueue documentation for offer() method says it should return true upon success and false if no space is currently available. I think this block in ConcurrentSetBlockingQueue should return true instead of false:

if (set.contains(e)) {
    return false;
}

jruaux avatar Dec 04 '20 19:12 jruaux