Skip to content

Commit

Permalink
🔄 Updated asyncio and print functions
Browse files Browse the repository at this point in the history
  • Loading branch information
shroominic committed Oct 23, 2023
1 parent 8bf0d8e commit 71a1f3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@


async def main():
await asyncio.gather(*[spawn_codebox() for _ in range(10)])
await asyncio.gather(spawn_codebox() for _ in range(10))


async def spawn_codebox():
async with CodeBox() as codebox:
await codebox.arun("print('Hello World!')")
print(await codebox.arun("print('Hello World!')"))


if __name__ == "__main__":
Expand Down

0 comments on commit 71a1f3c

Please sign in to comment.