First threads in Perl5.8.6 are not very reliable...move at least to 5.8.8. If, as you claim, the code works fine on some systems, list the platform, perl, and module versions of the systems that work, and compare it to your 5.8.6 system. Dosn't that make sense? There is no guarantee that older Perl versions will work as well as newer releases.... why do you think the new releases come out? ..... because they fix problems and work better.
| [reply] |
First threads in Perl5.8.6 are not very reliable...move at least to 5.8.8.
My experience is completely the opposite of that.
When I tried 5.8.8, the versions of threads & threads::shared that shipped with it: 1.07 & 0.94 respectively, were very unreliable, breaking pretty much every piece of pre-existing threaded code I had. Either through fast memory leaks that hadn't been evident with 5.8.6, or through mysterious hangs and traps, usually when detaching or joining threads.
It took many subsequent versions of both before they got back to the state of reliablility that the out-of-the-box versions that shipped with 5.8.6 had achieved.
And the state of reliability of any given one of the 45 versions of threads between 1.23 & 1.67 was a lottery. Sometimes things improved a little, only to fall apart again in the next release (which sometimes came later the very same day!). Sometimes they just hung. Same thing for the 25+ releases of threads::shared.
It is only in the last couple of months that things appear to have stabilised.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |
BrowserUk makes a good point, that reinforces my original advice to find the platform and perl version numbers that allow the script to work, and use that. He and I both use threads, but have very different coding styles( he is admittedly slicker, while my style is very clunky and straight-forward ), and that probably explains why we have different luck with different versions. You probably should not get stuck in relying on a Perl version to run your script, and should upgrade to the latest Perl version 5.10.0 and get the latest version of threads and threads::shared, then write your script to work with that. My clunky straight-forward style has very little trouble between version levels, because I use few tricks and take alot of precautions. I would be willing to bet your code uses techniques that pushes the safety limits of perl/threads, and probably can be written in a more clunky manner. :-) But IIRC from your cross-posting, my first fix would be to dump Net::SSH::Expect and go with Net::SSH2 ( which works well with threads).
| [reply] |
Except in the case of Vista. Or Perl 6.
| [reply] |