woke
This commit is contained in:
@@ -26,7 +26,7 @@ public class Client extends Thread {
|
||||
int r =new Random().nextInt(MAX_PORTION);
|
||||
try{
|
||||
while(r > compartiment.getQuantite()){
|
||||
this.wait();
|
||||
compartiment.wait();
|
||||
}
|
||||
} catch (InterruptedException e){
|
||||
e.printStackTrace();
|
||||
@@ -46,7 +46,7 @@ public class Client extends Thread {
|
||||
synchronized(restaurant){
|
||||
try{
|
||||
while(!restaurant.libre()){
|
||||
this.wait();
|
||||
restaurant.wait();
|
||||
}
|
||||
restaurant.ajouterClient();
|
||||
restaurant.notifyAll();
|
||||
|
||||
Reference in New Issue
Block a user