RFR 8078645: removeIf(filter) in ConcurrentHashMap removes entries for which filter is false
martinrb at google.com
Mon May 4 21:11:15 UTC 2015
Test uses some impressive machinery, but I like what we did in jsr166 tck
tests for similar sorts of tests:
- rename latch to "done"
- rename barrier to "threadsStarted"
- rename "map" to "entry" or "e"
- if a worker thread throws, make sure the test fails, e.g. by defining a
"CheckedRunnable" or using a real ThreadPool that returns Futures that can
be checked in the main thread.
- do you really want to swallow the exception from barrier.await?
But it's unfair to ask you to create a new jdk jtreg concurrency
testlibrary when jsr166 maintainers failed to do so!
On Mon, May 4, 2015 at 1:39 PM, Paul Sandoz <paul.sandoz at oracle.com> wrote:
> On May 4, 2015, at 7:29 PM, Paul Sandoz <Paul.Sandoz at oracle.com> wrote:
> >> There are still a number of differences, mostly cosmetic, between your
> version of ConcurrentMap.java and jsr166 CVS (let's try hard to keep that
> the "master" copy).
> > Yeah, there are a bunch of cosmetic differences, i just tried to fix
> some of the JavaDoc-like errors and may have slipped in some other cosmetic
> things. Let me fully sync up ConcurrentMap from 166.
> Done, webrev updated in place.
More information about the core-libs-dev