Merge "VMware: specify chunk size when reading image data" into stable/liberty

This commit is contained in:
Jenkins 2016-01-15 19:48:44 +00:00 committed by Gerrit Code Review
commit 9385d93028
1 changed files with 2 additions and 1 deletions

View File

@ -34,6 +34,7 @@ IMAGE_API = image.API()
IO_THREAD_SLEEP_TIME = .01
GLANCE_POLL_INTERVAL = 5
CHUNK_SIZE = 64 * 1024 # default chunk size for image transfer
class ThreadSafePipe(queue.LightQueue):
@ -173,7 +174,7 @@ class IOThread(object):
self._running = True
while self._running:
try:
data = self.input.read(None)
data = self.input.read(CHUNK_SIZE)
if not data:
self.stop()
self.done.send(True)