Feature Request: Allow @Setup to receive the thread Control

Aleksey Shipilev aleksey.shipilev at oracle.com
Thu Mar 27 07:56:12 UTC 2014


Oh, so you want to inject the Control object into the code under test in
@Setup. I thought you needed the stop flags in @Setup for some weird
reason. I'll add this to the list of things to improve.

-Aleksey.

On 03/27/2014 11:51 AM, Nitsan Wakart wrote:
> Hi,
> I'm benchmarking the Disruptor, which give an effectively blocking API,
> for 'queue' throughput. The way to contend with this could be to hack a
> WaitStrategy that would use the Control to check if it should stop
> spinning. The WaitStrategy is not part of the API under test but is
> decided on construction.
> Does this make sense? I can go into more detail
> Thanks,
> Nitsan
> 
> 
> On Thursday, March 27, 2014 9:47 AM, Aleksey Shipilev
> <aleksey.shipilev at oracle.com> wrote:
> Hi Nitsan,
> 
> On 03/24/2014 05:52 PM, Nitsan Wakart wrote:
>> Hi, Above is required to allow the pre-construction/initialization of
>> halting policies under test such that they respect the control flags.
>> I sadly need this to meet an existing interface requirement for the
>> policy.
> 
> Can you describe the use case a bit better? I am hesitant to explode the
> JMH API, and so would like to understand if there is an alternative
> "one-size-fits-all" solution.
> 
> 
> Thanks,
> 
> -Aleksey.
> 
> 
> 



More information about the jmh-dev mailing list