150151152153154155156157158159160
final Throwable workerError[] = new Throwable[1]; for (int i = 0; i < PRODUCER_COUNT; i++) { new Thread("Producer:" + i) { public void run() { try { producer.call(); } catch (Throwable e) { e.printStackTrace(); workerError[0] = e; } }
151152153154155156157158159160161
for (int i = 0; i < PRODUCER_COUNT; i++) { new Thread("Producer:" + i) { @Override public void run() { try { producer.call(); } catch (Throwable e) { e.printStackTrace(); workerError[0] = e; } }
145146147148149150151152153154155
172173174175176177178179180181182
final Throwable workerError[] = new Throwable[1]; for( int i=0; i < PRODUCER_COUNT; i++ ) { new Thread("Producer:"+i) { public void run() { try { producer.call(); } catch (Throwable e) { e.printStackTrace(); workerError[0] = e; } }
179180181182183184185186187188189