It's better to use something real instead of 1000 threads. Define static const variable to store threads amount.