Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Perl 5.8.8 threads, clean exit

by sundialsvc4 (Monsignor)
on Feb 28, 2013 at 17:59 UTC ( #1021082=note: print w/ replies, xml ) Need Help??


in reply to Perl 5.8.8 threads, clean exit

Pardon me for resurrecting a slightly-old thread here, but I do have a question that’s just bugging me.   Even though the particular code-sample given here does not actually print a message when it sends a KILL (phony-)signal to the threads, the OP says that the signal never gets sent to the second thread.

The example does seem to pretty closely match the one given in the PerlDoc, which at least implies that the signaling to multiple threads ought to be successful.   The example, in other words, appears to be pretty much “by the book.”

In the “Edit,” portion, which I am just now reading, the OP says that (in another Perl version) the loop that sends the signals blocks after sending the first signal.   Is this presumably the cause of the previously described behavior, “thread #2 never gets a signal?”

I understand that these are “not real signals,” and it’s easy enough to glom why not.   But does the implementation actually block the sender?!   Is that true of all the (all equally-phony) signal types?

How might the OP have salvaged this situation, in your (specifically, your...) opinion?   Is there an alternate way of doing a similar thing (“interrupting a child thread, more or less”) that would have been successful and reliable across versions?   Or is it simply, “irreconcilably broken?”


Comment on Re: Perl 5.8.8 threads, clean exit

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1021082]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2014-07-13 17:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (250 votes), past polls