Daemon
This commit is contained in:
@@ -2,12 +2,13 @@ public class Employe_du_buffet extends Thread{
|
||||
|
||||
public Compartiment[] buffet;
|
||||
|
||||
Employe_du_buffet(Compartiment[] buffet){
|
||||
public Employe_du_buffet(Compartiment[] buffet){
|
||||
this.buffet = buffet;
|
||||
this.setDaemon(true);
|
||||
}
|
||||
|
||||
public void run(){
|
||||
while(true){
|
||||
while(Thread.currentThread().isDaemon()){
|
||||
for(int i = 0; i<buffet.length;i++){
|
||||
if(buffet[i].getQuantite()<100){
|
||||
System.out.println("Employe Buffer : remplie de stand " + i);
|
||||
|
||||
Reference in New Issue
Block a user