Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

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.

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?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1046527]
Front-paged by Arunbear
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2018-06-18 03:33 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (107 votes). Check out past polls.