On Mon, Sep 12, 2016 at 3:22 AM, Aleksey Shipilev <sh...@redhat.com> wrote:
> > Minor things: > > CountedCompleter.java: > > 176 * setPendingCount(1); // not off by one ! > > is better spelled like this? > > 176 * setPendingCount(1); // only one pending, not two! > I already struggled over the wording here .... hmmm ... how about // looks off by one, but correct! > > SubmissionTest.java: > > + static long millisElapsedSince(long startTime) { > + return (System.nanoTime() - startTime) / (1000L * 1000L); > + } > ... > + if (millisElapsedSince(startTime) >= LONG_DELAY_MS) { > > I hate these unit conversions sprinkled everywhere. Can it be like this? > > This is already used pervasively in the tck tests. Imagine that millisElapsedSince were moved to a utility class, like JSR166TestCase, but for jtreg tests. > if (TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - startTime) >= > LONG_DELAY_MS) > I don't like the verbosity of that. Probably something closer to Guava's Stopwatch would be cleaner. http://google.github.io/guava/releases/19.0/api/docs/com/google/common/base/Stopwatch.html But that's a big TODO.