From ac4a42a43e0ab145b883f1be0b4d18c925742408 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Thu, 15 Feb 2018 06:02:29 +0545 Subject: [PATCH] docs: fix Select() example for new style API. --- docs/index.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index fbe944b1..da108372 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -289,9 +289,10 @@ available. for name in dirnames + filenames), 0) total = 0 - for recv, (msg, value) in Select(c.call_async(usage, '/tmp') for c in contexts): - print 'Context %s /tmp usage: %d' % (recv.context, value) - total += value + for msg in Select(c.call_async(usage, '/tmp') for c in contexts): + usage = msg.unpickle() + print 'Context %s /tmp usage: %d' % (recv.context, usage) + total += usage print 'Total /tmp usage across all contexts: %d' % (total,)