RFR 8078645: removeIf(filter) in ConcurrentHashMap removes entries for which filter is false (original) (raw)
Paul Sandoz paul.sandoz at oracle.com
Tue May 5 07:56:39 UTC 2015
- Previous message: RFR 8078645: removeIf(filter) in ConcurrentHashMap removes entries for which filter is false
- Next message: RFR 8078645: removeIf(filter) in ConcurrentHashMap removes entries for which filter is false
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On May 4, 2015, at 11:11 PM, Martin Buchholz <martinrb at google.com> wrote:
Paul, thanks.
Looks good. 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"
That name was meant to correspond to the kind of entry, i changed it to mapSupplier.
- 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!
Here's an update using CompletableFuture:
Paul.
- Previous message: RFR 8078645: removeIf(filter) in ConcurrentHashMap removes entries for which filter is false
- Next message: RFR 8078645: removeIf(filter) in ConcurrentHashMap removes entries for which filter is false
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]