Skip to content

Commit 45a0cce

Browse files
committed
RFC #80: Be more specific.
1 parent 5c19da1 commit 45a0cce

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

text/0080-simulation-task-groups.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,14 @@ async def testbench(ctx):
8686
- `start(coro, *, background = False) -> Task`
8787
- Create and start a new task.
8888
- A background task can be temporarily made non-background with `ctx.critical()` like a regular testbench.
89+
- Raise an exception if called before `__aenter__()` or after `__aexit__()`.
8990
- `async __aenter__() -> Self`
9091
- Return `self`.
92+
- Raise an exception if called multiple times.
9193
- `async __aexit__(...)`
9294
- Wait for all non-background tasks to run to completion.
93-
- Drop any incomplete background tasks.
95+
- Once all non-background tasks are done, any remaining background tasks are dropped without returning or unwinding from their pending awaits.
96+
- Raise an exception if called multiple times or if called without calling `__aenter__()` first.
9497

9598
`Task` is added with the following methods:
9699
- `result() -> Any`

0 commit comments

Comments
 (0)