David Brochart
David Brochart
I also don't call `close()`, now I think I'm seeing your point. Exiting the `Context` will still automatically close it in v5, but we will use `close()` to cancel its...
Not sure if this is what you want, but here is an example: ``` root component |-- component A | |-- component A1 | |-- component A2 |-- component B...
I was thinking that background tasks were launched in a task group that would be an attribute of the context, but exiting the context would not do anything to this...
I'm imagining that each component creates a task group where it starts its child components (it calls `start_soon(component.start, ctx)`), and this task group is passed to the child components' context...
A component creates a task group for its children. In the example above, component A creates a task group to start components A1 and A2. The root component creates a...
`Component.start()` does return, what I mean is that there is probably no need to create a task group in which to launch the root component's `start()` since there is no...
What about something like that? ```py async with create_task_group() as tg: async with Context(tg) as ctx: # now there is ctx.tg that users can use to launch background tasks await...
I'm not sure to understand, the task group is created and entered before the `Context` enters. But yes it could be done inside `Context`. The component's `start()` won't block after...
I must admit I'm a bit lost about what we're trying to achieve now. I thought the primary issue was that AnyIO's tasks don't play well with Asphalt, because unlike...
> The problem with what you pasted is that the generator is adjourned at `yield`. What happens when a child task crashes? What task gets interrupted with `CancelledError` then? Yes...