I'm trying to make a part of my thread group to be executed only in a last iteration of a thread. A thread will be stopped at some moment of time (by pressing stop at gui while debugging, or by sending stoptest.sh signal to the headless load stations during the load test itself), so I don't know, how many iterations will be executed to that moment. If I knew the exact number, I'd use an If controller with condition like ${__iterationNum} == 50, but that's not the case.
There is a tearDown thread group for such a thing as far as I know, but I need to access my threads local context for the operation I am executing. So basically the question can be asked as - What's the way to determine a "Stop_thread signal was allready sent, and the current iteration is the last one executed"? If i knew how to get it, I could then implement an If controller.
Hope I explained it clear enough, thanks in advance, guys PS Jmeter 4.0