##// END OF EJS Templates
speed up AsyncResult._wait_for_outputs (don't waste 0.01 seconds)...
Anton Akhmerov -
Show More
@@ -452,14 +452,14 b' class AsyncResult(object):'
452 452 timeout = -1
453 453
454 454 tic = time.time()
455 self._client._flush_iopub(self._client._iopub_socket)
456 self._outputs_ready = all(md['outputs_ready'] for md in self._metadata)
457 while not self._outputs_ready:
458 time.sleep(0.01)
455 while True:
459 456 self._client._flush_iopub(self._client._iopub_socket)
460 self._outputs_ready = all(md['outputs_ready'] for md in self._metadata)
461 if timeout >= 0 and time.time() > tic + timeout:
457 self._outputs_ready = all(md['outputs_ready']
458 for md in self._metadata)
459 if self._outputs_ready or \
460 (timeout >= 0 and time.time() > tic + timeout):
462 461 break
462 time.sleep(0.01)
463 463
464 464 @check_ready
465 465 def display_outputs(self, groupby="type"):
General Comments 0
You need to be logged in to leave comments. Login now