I have a threaded / queue ssh program that iterates over an ip/hostname list and executes a list of commands against each ip/hostname. I find that if I remove the sleep(0.0001) from the main thread of execution I get commands being repeated for the same host. However, adding the sleep appears to put a pause long enough to process each unique command for each host.
New contributor
parmerxceptn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.