Re: Should $thr->join() propegate exceptions to joiner?

[email protected] ("Rafael Garcia-Suarez") Tue, 12 Dec 2006 16:17:55 +0100
Newsgroups perl.perl5.porters,perl.ithreads
Message-ID <[email protected]>
On 12/12/06, Jerry D. Hedden <[email protected]> wrote:
> I think it would be simpler just to have an ->err() method
> that could be called after (or even before) a thread is
> joined:
>
>     my $result = $thr->join();
>     if ($thr->err()) {
>         die('Thread error: ' . $thr->err());
>     }
>
> I implemented this in the 'threads' module code, and if
> there is a concensus on the syntax, I'll submit a patch to
> blead and release a new version of 'threads' to CPAN.

FWIW, that sounds sensible to me.