concurrent-unique-queue
concurrent-unique-queue copied to clipboard
ConcurrentSetBlockingQueue.offer() should return true when element already exists
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;
}