Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Terminazione di <strong>thread</strong>s<br />
• Normalmente e` necessario eseguire la<br />
p<strong>thread</strong>_join per ogni <strong>thread</strong> che termina la<br />
sua esecuzione, altrimenti rimangono allocate le<br />
aree di memoria ad esso assegnate.<br />
• In alternativa si puo` “staccare” il <strong>thread</strong> dagli<br />
altri con:<br />
int p<strong>thread</strong>_detach(p<strong>thread</strong>_t th);<br />
‣ il <strong>thread</strong> rilascia automaticamente le risorse assegnatagli quando<br />
termina.<br />
M-fosset - Sistemi Operativi 2004-2005