in reply to Re^3: Threads, bash, and networking
in thread Threads, bash, and networking
alarms raised in the created thread were indeed caught by the main thread.
Which versions of Perl & threads?
I ask, because that is not what I see:
perl -Mthreads -E" $SIG{ALRM}=sub{die qq[main:Awooga!\n]}; async{ local $SIG{ALRM} = sub{ die qq[thread:Awooga\n] }; alarm 3; sleep 5 }->detach; sleep 7;" Thread 1 terminated abnormally: thread:Awooga
The alarm goes off, the thread-local signal handler catches it and executes and dies, the main thread then completes in the normal way.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Threads, bash, and networking
by juster (Friar) on Oct 23, 2010 at 07:22 UTC | |
by BrowserUk (Patriarch) on Oct 23, 2010 at 07:46 UTC |