Minor change to semaphore test

This commit is contained in:
Mattia Giambirtone 2023-05-16 16:04:01 +02:00 committed by nocturn9x
parent d8b2066126
commit 654add480d
Signed by: nocturn9x
GPG Key ID: 8270F9F467971E59
1 changed files with 1 additions and 2 deletions

View File

@ -2,7 +2,6 @@ import structio
async def child(i: int, sem: structio.Semaphore):
print(f"[child {i}] I'm alive!")
async with sem:
print(f"[child {i}] Entered critical section")
await structio.sleep(1)
@ -28,4 +27,4 @@ async def main(n: int, k):
# Should exit in about k seconds
structio.run(main, 3, 2)
structio.run(main, 3, 5)