Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Any way to send signal from a thread to his parent thread?

by anaconda_wly (Scribe)
on Apr 23, 2013 at 12:18 UTC ( #1030120=perlquestion: print w/replies, xml ) Need Help??
anaconda_wly has asked for the wisdom of the Perl Monks concerning the following question:

I created a thread from main listening commands from the remote. If command is an "END" command, the listening thread should notify the main to do sth. and then exit. I see Thread::signalling can notify from main thread to a child thread. How to do the reverse?

 No code yet.  

Replies are listed 'Best First'.
Re: Any way to send signal from a thread to his parent thread?
by Random_Walk (Prior) on Apr 24, 2013 at 10:47 UTC

    you could use a signal queue created with Thread::Queue. The children can then post messages to main on the queue.


    Pereant, qui ante nos nostra dixerunt!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1030120]
Approved by Corion
[Corion]: marto: I'm not sure on how to treat mail archives. I think you could either set an auto-deletion timespan or an auto-anonymisation timespan if you wanted to do it right.
[Corion]: For PM, I think we'll create a user "gdpr", who gets assigned the nodes of users who want to give up their user status here.
[marto]: can I nominate users ? :P

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (12)
As of 2018-05-22 08:30 GMT
Find Nodes?
    Voting Booth?