CPU usage with ssh.blocking = true (wodSSH / wodSSH.NET)
Hello,
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?
Thanks
Complete thread:
- CPU usage with ssh.blocking = true - Marc M, 2014-04-12, 00:22
- CPU usage with ssh.blocking = true - wodSupport, 2014-04-12, 01:07
- CPU usage with ssh.blocking = true - Marc M, 2014-04-14, 19:34
- CPU usage with ssh.blocking = true - wodSupport, 2014-04-14, 19:40
- CPU usage with ssh.blocking = true - Marc M, 2014-04-14, 20:28
- CPU usage with ssh.blocking = true - wodSupport, 2014-04-14, 20:30
- CPU usage with ssh.blocking = true - Marc M, 2014-04-14, 20:28
- CPU usage with ssh.blocking = true - wodSupport, 2014-04-14, 19:40
- CPU usage with ssh.blocking = true - Marc M, 2014-04-14, 19:34
- CPU usage with ssh.blocking = true - wodSupport, 2014-04-12, 01:07