for w in self.workers:
self.loop.add_callback(self._stop_worker, w)
for i in range(10):
if not self.workers:
break
else:
sleep(0.01)
del self.workers[:]
try:
self._loop_runner.run_sync(self._close, callback_timeout=timeout)
except RuntimeError: // IOLoop is closed
After Change
if not self.asynchronous:
self._loop_runner.stop()
return result
@gen.coroutine
def scale_up(self, n, **kwargs):
Bring the total count of workers up to ``n``