def clientprocess():
t1 = time.time()
clients = [gevent.spawn(client) for _ in range(N_CLIENTS)]
gevent.joinall(clients)
duration = time.time()-t1
print("%s clients served within %.2f s." % (N_CLIENTS, duration))
文章目录