Closed Nikratio closed 6 years ago
Will work on docs. FYI, there is no relation between the top level spawn()
function and the TaskGroup.spawn()
method. Nor is there any kind of hierarchy or relationship between different Task Groups. For a Task to be part of a group, it must be explicitly spawned from it or added to the group.
Added notes to better indicate the lack of relationships between task groups and the top-level spawn() function.
From the documentation, it is not clear to me:
curio.spawn
, a cancellation of task A does not affect task B. However, if task A first creates a task group, and then spawns B in that task group, then cancellation of A implies cancellation of B. This seems not just undocumented, but also wrong.It would be great if this could be clarified in the documentation.