@@ -409,7 +409,7 @@ While the two approaches have significant runtime implementation differences
409
409
(the former requires [ fibers] or a [ CPS transform] while the latter only
410
410
requires storing fixed-size context-local storage and [ ` Task ` ] state),
411
411
semantically they do the same thing which, in the Canonical ABI Python code, is
412
- factored out into the [ ` Task.wait ` ] method. Thus, the difference between
412
+ factored out into the [ ` Task.wait_on ` ] method. Thus, the difference between
413
413
` callback ` and non-` callback ` is one of optimization, not expressivity.
414
414
415
415
In addition to waiting for an event to occur, a task can also ** poll** for
@@ -470,9 +470,8 @@ loop interleaving `stream.read`s (of the readable end passed for `in`) and
470
470
` stream.write ` s (of the writable end it ` stream.new ` ed) before exiting the
471
471
task.
472
472
473
- A task may not call ` task.return ` unless it is in the "started" state. Once
474
- ` task.return ` is called, the task is in the "returned" state. A task can only
475
- finish once it is in the "returned" state. See the [ ` canon_task_return ` ]
473
+ Once ` task.return ` is called, the task is in the "returned" state. A task can
474
+ only finish once it is in the "returned" state. See the [ ` canon_task_return ` ]
476
475
function in the Canonical ABI explainer for more details.
477
476
478
477
### Borrows
@@ -976,7 +975,7 @@ comes after:
976
975
[ `canon_task_return` ] : CanonicalABI.md#-canon-taskreturn
977
976
[ `Task` ] : CanonicalABI.md#task-state
978
977
[ `Task.enter` ] : CanonicalABI.md#task-state
979
- [ `Task.wait ` ] : CanonicalABI.md#task-state
978
+ [ `Task.wait_on ` ] : CanonicalABI.md#task-state
980
979
[ `Waitable` ] : CanonicalABI.md#waitable-state
981
980
[ `Task` ] : CanonicalABI.md#task-state
982
981
[ `Subtask` ] : CanonicalABI.md#subtask-state
0 commit comments