correction du stand de cuissant et cuisinier

This commit is contained in:
Rochas
2024-12-07 12:37:03 +01:00
parent ce6a25f578
commit 3624e1ab66
9 changed files with 90 additions and 19 deletions

View File

@@ -11,6 +11,13 @@ public class Employe_du_buffet extends Thread{
while(Thread.currentThread().isDaemon()){
for(int i = 0; i<buffet.length;i++){
if(buffet[i].getQuantite()<100){
try {
while(!buffet[i].isLibre()){
buffet[i].wait();
}
} catch (Exception e) {
// TODO: handle exception
}
System.out.println("Employe Buffer : remplie de stand " + i);
buffet[i].remplir();
}