|
|
|
@ -76,8 +76,7 @@ contexts.
|
|
|
|
|
total = 0
|
|
|
|
|
recvs = [c.call_async(long_running_operation) for c in contexts]
|
|
|
|
|
|
|
|
|
|
with mitogen.master.Select(recvs) as select:
|
|
|
|
|
for recv, (msg, data) in select:
|
|
|
|
|
for recv, (msg, data) in mitogen.master.Select(recvs):
|
|
|
|
|
print 'Got %s from %s' % (data, recv)
|
|
|
|
|
total += data
|
|
|
|
|
|
|
|
|
@ -108,8 +107,7 @@ contexts.
|
|
|
|
|
])
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
with mitogen.master.Select(selects) as select:
|
|
|
|
|
for _, (msg, data) in select:
|
|
|
|
|
for recv, (msg, data) in mitogen.master.Select(selects):
|
|
|
|
|
print data
|
|
|
|
|
|
|
|
|
|
.. py:method:: get (timeout=None)
|
|
|
|
|