JMH Question: execution of code when iteration completes before TearDown
shade at redhat.com
Fri Sep 23 06:24:55 UTC 2016
On 09/22/2016 06:36 PM, Alexei Osipov wrote:
> Is it possible to get something executed after a thread finishes *last*
> invocation in benchmark iteration and before it goes to preTearDown.await()?
There is no good answer for this.
> 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.
See this sample:
More information about the jmh-dev