Reliable stream termination can be solved by tracking streams per portal, per nursery? #87
Labels
discussion
enhancement
New feature or request
help wanted
Extra attention is needed
question
Further information is requested
Milestone
As per #57 we need a system to help manage stream teardown, namely the explicit calling of
StreamReceiveChannel.aclose()
on either intentional stream termination by a consumer/producer or by the containingActorNursery
during its wait on all actors to complete or error phase.what we've got right now:
aclose
Portal
instance normally on the called/producer side of a connectionPortal
should get all streams cancelled when the actor is cancelled which should happen when a nursery block is cancelled, however, if deamon actors are left running and are producers of streams it's theoretically possible that a nursery waiter task could spin for at least a second before terminating the stream; this could potentially be avoided by callingPortal.aclose()
for any portal created by the currentActorNursery
?That last suggestion needs some thought; task-actor interaction in terms of how portals can be passed around between task versus actor nurseries is not clear to me yet.
The text was updated successfully, but these errors were encountered: