in reply to Re^4: Bareword "threads::joinable" not allowed while "strict subs" in use
in thread Bareword "threads::joinable" not allowed while "strict subs" in use
This must be new code otherwise you wouldn't only now be discovering that threads::joinable isn't available.
So, why not install a new version in parallel and run your new code on that?
Your sample code does nothing useful, so I cannot safely advise how to re-write it so that you do not need joinable; but if your threads are not returning anything, why join them at all?
You could just detach them and let them go away naturally; but then you need to have a mechanism for deciding when your main thread can end.
Alternatively; why test for joinable? Most of the time you want to wait for them all to end; so a simple:
$_->join for @threads;
Is all that is required.
But again, given silly sample code, it is impossible to advise which strategy makes sense in your case.
|
---|