In questo codice, cosa significano i due join e break? t1.join()
provoca t2
l'arresto fino al t1
termine?
Thread t1 = new Thread(new EventThread("e1"));
t1.start();
Thread t2 = new Thread(new EventThread("e2"));
t2.start();
while (true) {
try {
t1.join();
t2.join();
break;
} catch (InterruptedException e) {
e.printStackTrace();
}
}
while(true)
per chiamare il join
metodo.