Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re^2: Perl 5.8.8 threads, clean exit

by BrowserUk (Pope)
on Feb 27, 2013 at 00:44 UTC ( #1020783=note: print w/replies, xml ) Need Help??

in reply to Re: Perl 5.8.8 threads, clean exit
in thread Perl 5.8.8 threads, clean exit

Because I've read more than "a mention". Specifically:

CAVEAT: The thread signalling capability provided by this module does not actually send signals via the OS. It emulates signals at the Perl-level such that signal handlers are called in the appropriate thread. For example, sending $thr->kill('STOP') does not actually suspend a thread (or the whole process), but does cause a $SIG{'STOP'} handler to be called in that thread (as illustrated above).

As such, signals that would normally not be appropriate to use in the kill() command (e.g., kill('KILL', $$)) are okay to use with the ->kill() method (again, as illustrated above).

Correspondingly, sending a signal to a thread does not disrupt the operation the thread is currently working on: The signal will be acted upon after the current operation has completed. For instance, if the thread is stuck on an I/O call, sending it a signal will not cause the I/O call to be interrupted such that the signal is acted up immediately.

The 'signals' provided by threads are little more than an inappropriately named, elaborate polling mechanism. Ill-conceived; badly implemented; mostly useless.

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1020783]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2017-09-20 20:24 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (239 votes). Check out past polls.