Sending interrupts to the worker threads upon teardown
Aleksey Shipilev
aleksey.shipilev at oracle.com
Mon May 5 08:32:52 UTC 2014
On 04/14/2014 10:56 PM, Chris Vest wrote:
> Yeah… both are wrong. And there is no way for the harness to know how
> much work did or did not get done, or how much time was spent blocking.
> I was guessing that the synchronised iterations would magically take
> care of and exclude these kinds of outliers at the beginnings and the
> ends from the measurement, but I guess that was a misconception?
Actually, it *is* the case that synchronized iterations can consume the
interrupts. JMH 0.7 now does it, see:
http://hg.openjdk.java.net/code-tools/jmh/file/tip/jmh-samples/src/main/java/org/openjdk/jmh/samples/JMHSample_30_Interrupts.java
-Aleksey.
More information about the jmh-dev
mailing list