File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,8 @@ them. Here are the rules:
102
102
only that one will act as a checkpoint. This is documented
103
103
on a case-by-case basis.
104
104
105
+ * :func: `trio.open_nursery ` is a further exception to this rule.
106
+
105
107
* Third-party async functions / iterators / context managers can act
106
108
as checkpoints; if you see ``await <something> `` or one of its
107
109
friends, then that *might * be a checkpoint. So to be safe, you
Original file line number Diff line number Diff line change @@ -986,7 +986,11 @@ def open_nursery(
986
986
new `Nursery`.
987
987
988
988
It does not block on entry; on exit it blocks until all child tasks
989
- have exited.
989
+ have exited. If no child tasks are running on exit, it will insert a
990
+ schedule point (but no cancellation point) - equivalent to
991
+ :func:`trio.lowlevel.cancel_shielded_checkpoint`. This means a nursery
992
+ is never the source of a cancellation exception, it only propagates it
993
+ from sub-tasks.
990
994
991
995
Args:
992
996
strict_exception_groups (bool): Unless set to False, even a single raised exception
You can’t perform that action at this time.
0 commit comments