Skip to content

Commit 61f9727

Browse files
lukewagnerdicej
andcommitted
Tweaks from Joel
Co-authored-by: Joel Dice <joel.dice@fermyon.com>
1 parent 6f0b451 commit 61f9727

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

design/mvp/Async.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ called by the outside world), a new **task** is created that logically contains
127127
all the transitive control-flow state of the export call and will be destroyed
128128
when the export call finishes. When all of a component's exports are lifted
129129
synchronously, there will be at most one task alive at any one time. However,
130-
when a component exports asynchronousy-lifted functions, there can be multiple
130+
when a component exports asynchronously-lifted functions, there can be multiple
131131
tasks alive at once.
132132

133133
In the Canonical ABI explainer, a "task" is represented with the Python
@@ -302,7 +302,8 @@ function type has no params or results, since parameters are passed in via
302302
multiple `summarize` calls can be active at once: once the first call to
303303
`task.wait` blocks, the runtime will suspend its callstack (fiber) and start a
304304
new stack for the new call to `summarize`. Thus, `summarize` must be careful to
305-
allocate a separate linear-memory stack in its entry point, if one is needed.
305+
allocate a separate linear-memory stack in its entry point, if one is needed,
306+
and to save and restore this before and after calling `task.wait`.
306307

307308
(Note that, for brevity this example ignores the `memory` and `realloc`
308309
immediates required by `canon lift` and `canon lower` to allocate the `list`

design/mvp/CanonicalABI.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1995,7 +1995,7 @@ an "event loop" inside `canon_lift`. Otherwise, waiting must happen by calling
19951995
`task.wait` (defined below), which potentially requires the runtime
19961996
implementation to use a fiber (aka. stackful coroutine) to switch to another
19971997
task. Thus, `callback` is an optimization for avoiding fiber creation for async
1998-
languages that don't need it (e.g., JS, C# and Rust).
1998+
languages that don't need it (e.g., JS, Python, C# and Rust).
19991999

20002000
Uncaught Core WebAssembly [exceptions] result in a trap at component
20012001
boundaries. Thus, if a component wishes to signal an error, it must use some

0 commit comments

Comments
 (0)