libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@apache.org
Subject [2/2] git commit: Add short delay to prevent busy waiting.
Date Sun, 29 Dec 2013 03:44:24 GMT
Add short delay to prevent busy waiting.


Project: http://git-wip-us.apache.org/repos/asf/libcloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/libcloud/commit/b8adad94
Tree: http://git-wip-us.apache.org/repos/asf/libcloud/tree/b8adad94
Diff: http://git-wip-us.apache.org/repos/asf/libcloud/diff/b8adad94

Branch: refs/heads/trunk
Commit: b8adad947084c8d0c51d1ee1d858ed8de2fb5745
Parents: 22052ae
Author: Tomaz Muraus <tomaz@apache.org>
Authored: Sun Dec 29 04:33:09 2013 +0100
Committer: Tomaz Muraus <tomaz@apache.org>
Committed: Sun Dec 29 04:33:09 2013 +0100

----------------------------------------------------------------------
 libcloud/compute/ssh.py | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/libcloud/blob/b8adad94/libcloud/compute/ssh.py
----------------------------------------------------------------------
diff --git a/libcloud/compute/ssh.py b/libcloud/compute/ssh.py
index 88094a5..0924bad 100644
--- a/libcloud/compute/ssh.py
+++ b/libcloud/compute/ssh.py
@@ -29,6 +29,7 @@ except ImportError:
 # Ref: https://bugs.launchpad.net/paramiko/+bug/392973
 
 import os
+import time
 import subprocess
 import logging
 
@@ -296,6 +297,9 @@ class ParamikoSSHClient(BaseSSHClient):
 
                     data = chan.recv_stderr(CHUNK_SIZE)
 
+            # Short sleep to prevent busy waiting
+            time.sleep(1.5)
+
         # Receive the exit status code of the command we ran.
         status = chan.recv_exit_status()
 


Mime
View raw message