in reply to Re^3: Help needed with regard to arrays
in thread Help needed with regard to arrays

So I plugged in your code to the script that I am writing which ssh's to different systems and runs a tasks. I want it to be able create 10 simultaneous ssh threads to 10 different systems (hence the array with 10 hostnames in the array). With your Thread::Queue code, the ssh is not concurrent (if there is a server that is not available for instance, the ssh command sits there till it times out before moving to the next one). Does this make sense?
  • Comment on Re^4: Help needed with regard to arrays

Replies are listed 'Best First'.
Re^5: Help needed with regard to arrays
by Corion (Patriarch) on Nov 20, 2008 at 20:18 UTC
    (if there is a server that is not available for instance, the ssh command sits there till it times out before moving to the next one)

    What did you expect the ssh command or subroutine to do?

    Or do you mean to say that only ever one ssh subroutine is connecting/running, despite that you think you're running the subroutine in many threads? I'm not sure that the ssh libraries are threadsafe.

      Yes...only 1 is connecting/running. I am using ssh through a system() call

        Maybe you can show us your code? I have a hard time imagining your code.