in reply to Re^2: Exiting a script with an 'infinitely looping' thread
in thread Exiting a script with an 'infinitely looping' thread
e detach thread - not sure how to do this but it sounds promising.
See the pod for threads, but essentially where you currently do:
my $immortal = threads->create( ...);
doing
threads->create( ...)->detach;
is pretty much all there is to it. As the pod says:
$thr->detach()Makes the thread unjoinable, and causes any eventual return value to be discarded. When the program exits, any detached threads that are still running are silently terminated.
|
|---|