bvanalderweireldt / concurrent-unique-queue Goto Github PK
View Code? Open in Web Editor NEWJava Concurrent Unique Queue
License: Apache License 2.0
Java Concurrent Unique Queue
License: Apache License 2.0
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;
}
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.
Please,
extend functionality to be possible to add predifined number of each element in queue (i.e. not more than "given number"). HashMap maybe?
Thank you.
ConcurrentSetQueue#poll()
contains a call to set.spliterator()
whose results is not used, so I suspect it can be removed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.