class BinSema
{ static final boolean FREI = true ;
static final boolean BESETZT = false ;
private boolean zustand = FREI ;
public synchronized void P ()
{ try { while(zustand == BESETZT)
wait() ;
}
catch (InterruptedException e) {}
zustand = BESETZT ;
}
Vorherige Folie
Nächste Folie
Zurück zur ersten Folie
Graphik-Version anzeigen