Re: Thread Exiting
[email protected] ("Rafael Garcia-Suarez") Tue, 18 Jul 2006 22:14:00 +0200
| Newsgroups | perl.perl5.porters,perl.ithreads |
|---|---|
| Message-ID | <[email protected]> |
On 18/07/06, Jerry D. Hedden <[email protected]> wrote: > Default behavior is for exit() in main or a thread to exit > the app. Which is backwards-compatible, then good. > There is a thread-exit-only class method: threads->exit() > > If called from main, it acts like 'exit(0)', complete > with warning message as per above, if applicable. Can't you call threads->exit($status) ? > The default behavior for exit() in threads can be changed in > several ways: > Global change > use threads 'exit' => 'threads_only'; I assume that's "thread_only". > # or > use threads 'exit' => 'threads'; > After thread creation > threads->set_thread_exit_only(); # Inside a thread > # or > $thr->set_thread_exit_only(); Er, set_thread_only_exit($boolean) might be better ?