docs: fix Select() example for new style API.

This commit is contained in:
David Wilson 2018-02-15 06:02:29 +05:45
parent e59cc89059
commit ac4a42a43e
1 changed files with 4 additions and 3 deletions

View File

@ -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,)