Message44069
Logged In: YES
user_id=80475
For the record, here a simple and efficient roundrobin task
server based on collections.deque:
def roundrobin(*iterables):
pending = deque(iter(i).next for i in iterables)
gettask, scheduletask = pending.popleft, pending.append
while pending:
task = gettask()
try:
yield task()
except StopIteration:
continue
scheduletask(task)
for value in roundrobin('abc', 'd', 'efgh'):
print value |
|
Date |
User |
Action |
Args |
2007-08-23 15:27:51 | admin | link | issue756253 messages |
2007-08-23 15:27:51 | admin | create | |
|