My Tech Notes
Search This Blog
Concurrent set in java
There is no ConcurrentHashSet class in java but you can get a concurrent set from a ConcurrentHashMap using the following method:
Set
set = Collections.newSetFromMap(new ConcurrentHashMap
());
See also
Why there is no ConcurrentHashSet against ConcurrentHashMap
Collections.netSetFromMap()
No comments:
Post a Comment
Newer Post
Older Post
Home
View mobile version
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment