olliesilvester / htss-rig-bluesky-work-experience

Config and scripts for using hte HTSS rigs
Apache License 2.0
0 stars 0 forks source link

Asyncio part 1 #2

Open olliesilvester opened 3 months ago

olliesilvester commented 3 months ago

Write a program that uses asyncio to run three asynchronous tasks concurrently. Each task should print a message and sleep for a different amount of time (e.g., 1, 2, and 3 seconds). Use asyncio.gather to ensure all tasks are run concurrently.

Example output:

Task 1 started
Task 2 started
Task 3 started
Task 1 completed
Task 2 completed
Task 3 completed