Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Nursery: don't act as a checkpoint when not running anything
Previously, a Nursery would checkpoint on exit, regardless of whether it was running anything. This is a bit annoying, see python-trio#1457, so let's change it to not checkpoint on exit. Now it won't be a checkpoint at all if there's no tasks running inside. However, this doesn't fully solve python-trio#1457, because we'll still inject a cancel even if none of the child tasks raise Cancelled. This seems to break trio/_core/tests/test_asyncgen.py::test_last_minute_gc_edge_case such that it no longer ever hits the edge case. That seems like a pretty complicated test, so maybe @oremanj can say better why exactly it's breaking with this change.
- Loading branch information