【 在 iwannabe 的大作中提到: 】
: async def handle_packet(packet):
: xxxxx
:
: ...................
我是希望
async def read_from_websocket(uri):
async with websockets.connect(uri) as websocket:
while True:
packet = await websocket.recv()
await handle_packet(packet)
这个函数能并行同时运行多个,达到类似多进程的效果,你这样写好像只能运行一个
--
FROM 112.45.96.*