Re: Should $thr->join() propegate exceptions to joiner?
[email protected] (Eric Rybski) Tue, 12 Dec 2006 08:47:55 -0800 (PST)
| Newsgroups | perl.perl5.porters,perl.ithreads |
|---|---|
| Message-ID | <[email protected]> |
Jerry, --- "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()); > } > That sounds pretty good. One thing to watch for is that blessed references can also be propegated by $thr->err(), so OO results (like those returned by Exception::Class and Error) will survive the trip across threads. -Eric