Comments on: Java 8, Implementing a ConcurrentHashSet https://speedment.com/java-8-implementing-a-concurrenthashset/ Build Fast Java Applications for the Fastest Business Performance Fri, 01 May 2020 05:21:37 +0000 hourly 1 https://wordpress.org/?v=5.1.1 By: Per Minborg https://speedment.com/java-8-implementing-a-concurrenthashset/#comment-114 Wed, 06 Jul 2016 09:25:04 +0000 https://speedment.com/java-8-implementing-a-concurrenthashset/#comment-114 A synchronized Set is not concurrent. A synchronized Set will only accept one thread at a time whereas a concurrent Set can accept a plurality of concurrent threads. Hence its name.

]]>
By: Toolman https://speedment.com/java-8-implementing-a-concurrenthashset/#comment-115 Mon, 04 Jul 2016 22:35:05 +0000 https://speedment.com/java-8-implementing-a-concurrenthashset/#comment-115 What about using Collections.synchronizedSet(new HashSet(…)); ?

]]>
By: Per Minborg https://speedment.com/java-8-implementing-a-concurrenthashset/#comment-157 Fri, 04 Dec 2015 22:35:30 +0000 https://speedment.com/java-8-implementing-a-concurrenthashset/#comment-157 Hi Anonymous. I have improved the look of the code examples from now on. Checkout http://minborgsjavapot.blogspot.com/2015/12/do-not-let-your-java-objects-escape.html and tell me what you think.

]]>
By: Anonymous https://speedment.com/java-8-implementing-a-concurrenthashset/#comment-160 Fri, 23 Oct 2015 09:19:36 +0000 https://speedment.com/java-8-implementing-a-concurrenthashset/#comment-160 Dude when you write articles why don't you colorise the source code???? WHY?? Why is everything half finished?

]]>
By: Per Minborg https://speedment.com/java-8-implementing-a-concurrenthashset/#comment-182 Sat, 06 Dec 2014 22:02:36 +0000 https://speedment.com/java-8-implementing-a-concurrenthashset/#comment-182 You are absolutely right Louis. Thanks for pointing out that. I have updated the post accordingly.

]]>
By: Unknown https://speedment.com/java-8-implementing-a-concurrenthashset/#comment-183 Fri, 05 Dec 2014 21:42:50 +0000 https://speedment.com/java-8-implementing-a-concurrenthashset/#comment-183 Your addIfAbsent method seems exactly equivalent to the perfectly normal Set.add method, which already returns true if and only if the element was previously absent and has since been added.

]]>