<@U114Z86N6> It will not deadlock. Cancelling pare...
# coroutines
e
@kevinherron It will not deadlock. Cancelling parent immediately cancels children, it then waits for them to complete. Moreover, since children receive from parent’s channel in your case, if parent terminates normally, then it closes its own channel (first!), thus aborting all receiving children, and then waits for its children to complete.
k
any thoughts on how I could actually get that scenario to work in the first place?
k
@elizarov tiny clarification When a parent is canceled, it immediately cancels the children then waits for them to complete. does this mean
cancel
will be changed so it is blocking? Or will the parent simply move to a
Cancelling
state?
e
The later.
cancel
is non blocking. It moves parent to cancelling state and cancels all the children, then waits for children to complete before becoming cancelled.
k
Great. I thought so too. Thank you