JMH Question: execution of code when iteration completes before TearDown

Alexei Osipov osipov.av at
Thu Sep 22 16:36:27 UTC 2016


Is it possible to get something executed after a thread finishes *last*
invocation in benchmark iteration and before it goes to preTearDown.await()?

I have asymmetric JMH test for a blocking queue-like data structure and
can't find what's proper way to execute actions that will unblock treads
blocking on my queue in JMH. I've supposed to do "unblocking" in @TearDown
part of thread-specific state but it seems like @TearDown is not executed
till all threads are finished.

Best regards,
Alexei Osipov.

More information about the jmh-dev mailing list