Hi all,
I am exploring the use of ithreads in a service application that I am developing. Generally, the main thread is a SOAP::Transport::HTTP daemon that spawns worker threads at the onset. Whenever it receives a SOAP method call, it will send out jobs to the worker threads via thread::queue. Whichever receives the job in the ::queue will work on it.
I am having some difficulties understanding (i)threading and SOAP::Transport::HTTP in Perl. The first of which is: how can my main application (which created the SOAP::Transport::HTTP daemon in a thread of its own) stop/ kill the daemon thread without kill the whole app? I tried use thread::exit and call exit() in the daemon module, but it did not work.
Next question: is there any way I can have my worker threads share an object? threads::shared seems to accomodate only simple scalars.
Third question (and last for this mail!): how can i kill a thread from the main app? ActivePerl does not support the thread::suspend module (which has a kill() method), and I want to respect that. But sometimes I really want to restart my worker threads.
I am quite happy to know that ActivePerl generally supports threading quite well. I just need to know that 5.8.x is ready for some production threading apps.
Thanks for your help! _______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
