Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions src/async_examples/concurrency.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,11 @@ async def retry_with_backoff(func, max_retries=3):
async def sorter(arr):
print("codeflash stdout: Sorting list")
await asyncio.sleep(0.00001)
for i in range(len(arr)):
for j in range(len(arr) - 1):
if arr[j] > arr[j + 1]:
temp = arr[j]
arr[j] = arr[j + 1]
arr[j + 1] = temp
arr.sort()
print(f"result: {arr}")
return arr


async def task():
time.sleep(1)
return "done"
return "done"
Loading