Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Create your own signal in Perl

by meena (Novice)
on Jul 26, 2013 at 14:46 UTC ( [id://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.

Replies are listed 'Best First'.
Re: Create your own signal in Perl
by kennethk (Abbot) 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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (8)
As of 2024-04-19 15:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found