def _onReceived(self, block, res, res2):
if res != -errno.ESHUTDOWN:
# XXX: is it good to resubmit on any other error ?
self._aio_context.submit([block])
if res < 0:
trace('aio read completion error:', -res)
else:
trace('aio read completion received', res, 'bytes')
self._writer(block.buffer_list[0][:res])
评论列表
文章目录