My Tech Notes
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
‹
›
Home
View web version
No comments:
Post a Comment