Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Create your own signal in Perl

by meena (Novice)
on Jul 26, 2013 at 14:46 UTC ( #1046527=perlquestion: print w/ replies, xml ) Need Help??
meena has asked for the wisdom of the Perl Monks concerning the following question:

I want to write a script in which I can implement Event and signal handling I want to emit a Signal in one thread and catch the Signal emitted in another thread which calls the signal callback.

Comment on Create your own signal in Perl
Re: Create your own signal in Perl
by kennethk (Monsignor) on Jul 26, 2013 at 14:56 UTC
    No too dificult. Do you want to use Perl threads or forks? See THREAD SIGNALLING for the former; Signals in perlipc and kill for the latter.

    #11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.

Re: Create your own signal in Perl
by mtmcc (Hermit) on Jul 26, 2013 at 14:57 UTC
      main function waits for a signal to get emitted ,and then it calls the signal callback some thread later emits the signal Is that possible in Perl??
        I don't use threading very often, so probably not the right person to ask. As well as the links given above, this tutorial might be helpful.

        Best of luck!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1046527]
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (11)
As of 2014-10-24 12:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (131 votes), past polls