28.04.2014 Views

Moniteurs, Java, Threads et Processus - Montefiore

Moniteurs, Java, Threads et Processus - Montefiore

Moniteurs, Java, Threads et Processus - Montefiore

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Note <strong>Java</strong> : wait <strong>et</strong> notify<br />

• wait() : Suspend le processus courant <strong>et</strong> libère l’exclusion mutuelle<br />

relative à l’obj<strong>et</strong> courant.<br />

• notify() : Sélectionne un processus en attente sur l’obj<strong>et</strong> courant <strong>et</strong><br />

le rend exécutable. Le processus sélectionné doit réacquérir l’exclusion<br />

mutuelle associée à l’obj<strong>et</strong> (il n’y a pas de reprise immédiate).<br />

• notifyAll() : Similaire à notify(), mais rend exécutable tous les<br />

processus en attente sur l’obj<strong>et</strong> courant.<br />

30

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!