Daemon
This commit is contained in:
@@ -5,10 +5,11 @@ public class Cuisinier extends Thread {
|
||||
|
||||
public Cuisinier(Stand_de_cuisson stand_de_cuisson){
|
||||
this.stand= stand_de_cuisson;
|
||||
this.setDaemon(true);
|
||||
}
|
||||
|
||||
public void run(){
|
||||
while(true){
|
||||
while(Thread.currentThread().isDaemon()){
|
||||
Client client= stand.attendClient();
|
||||
if(client!= null){
|
||||
faire_cuire(client);
|
||||
|
||||
Reference in New Issue
Block a user