in reply to Wx subs and threads

How can I stop a thread on demand? Do I need to create some sort of listener or watchdog thread that kills the worker thread?

It's the same as all other threaded Perl apps. You can setup a shared variable, which you constantly test in the thread, telling it to return. Or if you use the latest threads, it has

# Send a signal to a thread $thr->kill(’SIGUSR1’);
which would be useful for stopping a long running executable.

I'm not really a human, but I play one on earth CandyGram for Mongo

Replies are listed 'Best First'.
Re^2: Wx subs and threads
by Anonymous Monk on Jun 27, 2008 at 14:55 UTC
    Perfect...included with the threads module is a great example script that explains it all. Thanks for pointing me in the right direction.