
async def process_chunk(chunk: str) -> str:
time.sleep(0.1)
return chunk.upper()
async def main():
chunks = ["text"] * 100
tasks = [process_chunk(c) for c in chunks]
results = await asyncio.gather(*tasks)
print(len(results))
async def process_chunk(chunk: str) -> str… - sobes.tech