As the per-thread functions in the api.startstop test are not generated, it is a pain to increase the thread count beyond 10. Here we add modulus to make it easy to increase the thread count without sacrificing much of what is being tested. This is for local experiments to reproduce problems: I don't know that we want to make the regression test too large.