I have a question regarding join(). If this is not the correct list, please let me know.

Simply put, join() doesn't seem to be returning anything. Below is my test code; what am I missing?

_______________________


use threads;

threads->create(sub { sleep $i; return time(); })
while ($i++ < 5);

foreach $thr (threads->list) {
next if threads::equal($thr, threads->self);
push @results, $thr->join;
}
die "results undefined\n" unless (defined @results);

print $_, "\n" for (@results);

________________________


This code always dies "results undefined".
Any help (or bonks on the head) would be appreciated.


Regards,
Jesse



Reply via email to