Elizabeth Mattijsen wrote:
At 11:42 -0500 11/26/02, Jesse Butler - Sun Microsystems wrote:...Is there a way to use thrown Error's (from Error.pm) or die's from a thread? I want to die or throw, and then eval or catch in the main thread, but I keep getting these "failed to start" messages.
It looks like it used to say "died" and they changed it to "failed to start"... either way, my eval's and/or catch's are not working. Any ideas?
This way we're never going to get any traffic on the ithreads mailing list... That's why I Cc'd the ithreads mailing list.
Actually, I haven't ever used Error.pm myself, let alone with threads.
If you want to communicate between threads (which is basically what you want), I see basically 2 possibilities:
1. Thread::Exit
Allows you to exit a thread anywhere and assign return values. This doesn't generate an event in the main thread, though.
2. Thread::Signal
If you're on Linux you might want to try this: it allows you to generate an event in the main thread from a piece of "catch" code.
Hope this helps.
Liz
Liz,
Sorry about that - I was replying all and you and I were the only one on the list... :)
Anyhow, it sounds like Thread-Exit would help. For curiosity's sake, do you know if there are any plans to allow thrown exceptions or die's from threads?
Best regards,
Jesse