Skip to content

Commit

Permalink
Cancel scope on stream consumer completion
Browse files Browse the repository at this point in the history
  • Loading branch information
goodboy committed May 2, 2021
1 parent bc98387 commit 921210a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,8 @@ async def consume(task_status=trio.TASK_STATUS_IGNORED):
print("all values streamed, BREAKING")
break

cs.cancel()

# TODO: this is justification for a
# ``ActorNursery.stream_from_actor()`` helper?
await portal.cancel_actor()

0 comments on commit 921210a

Please sign in to comment.