Thread Gibt es für threads Methode done()? (2 answers)
Opened by Gast at 2006-05-23 15:47

GwenDragon
 2006-05-23 22:05
#66542 #66542
User since
2005-01-17
14612 Artikel
Admin1
[Homepage]
user image
Es gibt leider keine solche Methode im Modul threads.

Ich weiß nicht, ob das dir hilft:
http://www.mathematik.uni-ulm.de/help/perl5/doc/perlthrtut.html
Quote
What Threads Are Running?

threads->list returns a list of thread objects, one for each thread that's currently running and not detached. Handy for a number of things, including cleaning up at the end of your program:
# Loop through all the threads
foreach $thr (threads->list) {
# Don't join the main thread or ourselves
if ($thr->tid && !threads::equal($thr, threads->self)) {
$thr->join;
}
}

If some threads have not finished running when the main Perl thread ends, Perl will warn you about it and die, since it is impossible for Perl to clean up itself while other threads are running
\n\n

<!--EDIT|GwenDragon|1148407932-->

View full thread Gibt es für threads Methode done()?