This commit is contained in:
Minh VU
2024-12-02 15:05:20 +01:00
parent b19cdd0d40
commit 73e22d6142
2 changed files with 13 additions and 1 deletions

View File

@@ -7,6 +7,15 @@ public class Cuisinier extends Thread {
this.stand= stand_de_cuisson;
}
public void run(){
while(true){
Client client= stand.attendClient();
if(client!= null){
faire_cuire(client);
}
}
}
public void faire_cuire(Client client){
try{
long temps_cuire =new Random().nextInt(300 - 100) + 100;

View File

@@ -1,5 +1,8 @@
public class Stand_de_cuisson {
public synchronized void finir_cuit(){
public synchronized void attendClient(){
}
public synchronized void finir_cuit(Client client){
notifyAll();
}
}