How to end a thread in perl
- by user1672190
I am new to perl and i have a question about perl thread.
I am trying to create a new thread to check if the running function is timed out, and my way of doing it is as below.
Logic is
1.create a new thread
2.run the main function and see if it is timed out, if ture, kill it
Sample code:
$exit_tread = false; # a flag to make sure timeout…