Bonjour,
Deux processus s'exécutant en parallèle:
S'il vous plait, quelle est la condition qui me permet de sortir de la boucle while quand le processus thread termine son exécution?Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 Thread thread = new Thread("New Thread") { public void run(){ //instruction } }; Thread thread1 = new Thread("New Thread1") { public void run(){ while(condition) { //instruction1 } } }; thread.start(); thread1.start();
Merci.