for (int i = 0; i < num_producers; i++)
{
producers[i] = new Producer("Number " + (i + 1),
queue,
num_iterations,
new TimeValue (num_timeout_secs, num_timeout_nano_secs));
new Thread(thread_group, producers[i]).start();
}
for (int i = 0; i < num_consumers; i++)
{
consumers[i] = new Consumer("Number " + (i + 1), queue, num_iterations, new TimeValue (num_timeout_secs, num_timeout_nano_secs));
new Thread(thread_group, consumers[i]).start();
}
try
{