http://www.perlmonks.org?node_id=1046527

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!