in reply to How to break up a long running process

T'is easy.

#!/usr/bin/perl -w use IO::Socket; use strict; use threads; use threads::shared; #sock is my connection where I report what is going on my $sock = IO::Socket::INET->new( PeerAddr => 'hostname.org', PeerPort => '1234', Proto => 'tcp' ); my $done:shared = 0; my $thread = async{ long_running_function(); $done = 1 }; print $sock "I'm still here" and sleep 180 until $done; my $return_value = $thread->join; print $sock "$return_value\n"; close $sock;

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.