Hi, (Please ignore the previous mail.) In this example this fellow detaches all useless threads. In my case this is not an option , because a detached thread never ends. For correct thread managing it is enough to remove the detached thread from the list but the process will still run. I need to kill the process! (Verilog simulation in my case) Thanks, Igor
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of zentara Sent: Wednesday, January 14, 2004 5:28 PM To: [EMAIL PROTECTED] Subject: Re: threads in perl On Tue, 13 Jan 2004 17:17:20 +0200, [EMAIL PROTECTED] (Igor Ryaboy) wrote: >Hi All! > >I am running a multithread program and threads may stuck. I need to be able to >terminate those threads after some defined period of time. I can't use a detach >because I don't want to leave this thread run forever and I can't use join because >the thread never ends. Any ideas? Please help :) > >Igor Yeah, a fellow posting on perlmonks.org just did a nice job of this using threads::shared and sending some kill signals thru shared variables. It is a multi-threaded chat server, and he had a similar problem, killing off detached threads. It is quite long, but it works. Here is the url. I hope it may give you some ideas. http://perlmonks.org/index.pl?replies=1&node_id=319769&displaytype=print -- When life conspires against you, and no longer floats your boat, Don't waste your time with crying, just get on your back and float. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>