Thread non actif
Un thread devient non actif quand :
-
la méthode sleep est invoquée
- la méthode wait met en attente d'une condition
- le thread est bloqué par une entrée-sortie.
public void run() {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// Si interruption
}
}
}
Mise en sommeil du thread pendant une seconde.
- 16 -
Alain Bouju Thread