CPU usage with ssh.blocking = true - WeOnlyDo Discussion board

CPU usage with ssh.blocking = true (wodSSH / wodSSH.NET)

by Marc M, Saturday, April 12, 2014, 00:22 (2236 days ago)


I am running multiple threads of the ssh class so I can run commands on several network devices at once. They are all set to 'blocking = true' and I am using the 'client.waitfor()' method to pause for the responses. While the regex I am using does work and will process correctly, when my code is 'waitingfor' the cpu core spikes to 100% usage while it waits for the data to return.

Is this normal? Is there a workaround without having to switch from blocking mode to using events?


Complete thread: