[concurrency-interest] ConcurrentHashSet?

Christian Vest Hansen karmazilla at gmail.com
Fri Jul 31 16:26:43 EDT 2009


Ah, nice! Thanks both of you.

On Fri, Jul 31, 2009 at 4:58 PM, David M. Lloyd<david.lloyd at redhat.com> wrote:
> On 07/31/2009 09:17 AM, Christian Vest Hansen wrote:
>>
>> I have on multiple occasions found myself wanting a ConcurrentHashSet
>> that is to ConcurrentHashMap as HashSet is to HashMap. Yet I find no
>> such class in java.util.concurrent.
>
> You could use use Collections.<XX>newSetFromMap(new
> ConcurrentHashMap<XX,Boolean>(...));
>
> - DML
>



-- 
Venlig hilsen / Kind regards,
Christian Vest Hansen.


More information about the Concurrency-interest mailing list