def pycos_proc(n, task=None):
s = random.uniform(0.5, 3)
print('%f: process %d sleeping for %f seconds' % (time.time(), n, s))
yield task.sleep(s)
print('%f: process %d terminating' % (time.time(), n))
# create 10 clients
文章目录