@@ -110,7 +110,7 @@ to be rewritten to use source-language concurrency mechanisms (like callbacks,
110110` main() ` and calls to ` read() ` , ` write() ` and ` select() ` can run without change
111111in the Preview 3 ` wasi:cli/command ` world, which exports `run: async func() ->
112112result` . Thus, ` async` in WIT does not require the same kind of transitive
113- source-code changes as source-level ` async ` in langauges like C#, Python, JS,
113+ source-code changes as source-level ` async ` in languages like C#, Python, JS,
114114Rust and Dart.
115115
116116Because ` async ` exports impose little to no requirements on the guest
@@ -379,10 +379,10 @@ the following 3 thread built-ins. Once the thread is resumed, the thread can
379379learn its own index by calling the [ ` thread.index ` ] built-in.
380380
381381A suspended thread (identified by thread-table index) can be resumed at some
382- non-deterministic point in future via the [ ` thread.resume-later ` ] built-in. In
382+ nondeterministic point in future via the [ ` thread.resume-later ` ] built-in. In
383383contrast, the [ ` thread.yield-to ` ] built-in switches execution to the given
384384thread immediately, leaving the * calling* thread to be resumed at some
385- non-deterministic point in the future. Lastly, the [ ` thread.switch-to ` ]
385+ nondeterministic point in the future. Lastly, the [ ` thread.switch-to ` ]
386386built-in switches execution to the given thread immediately, like ` yield-to ` ,
387387but leaves the calling thread in the "suspended" state. These three functions
388388can be used to resume both newly-created threads as well as threads that
@@ -658,7 +658,7 @@ component-instance-wide lock is implicitly acquired every time core wasm is
658658executed. By returning to the event loop after every event (instead of once at
659659the end of the task), stackless async exports release the lock between every
660660event, allowing a higher degree of concurrency than synchronous exports.
661- Stackfull async exports ignore the lock entirely and thus achieve the highest
661+ Stackful async exports ignore the lock entirely and thus achieve the highest
662662degree of (cooperative) concurrency.
663663
664664Since non-` async ` functions are not allowed to block (including due to
@@ -771,7 +771,7 @@ state and returns which state was reached. If called asynchronously, then if a
771771cancellable subtask thread is resumed * and* the subtask reaches a resolved
772772state before suspending itself for whatever reason ` subtask.cancel ` will return
773773which state was reached. Otherwise, ` subtask.cancel ` will return a "blocked"
774- sentinel value and the caller must [ wait] [ #waitables-and-waitable-sets ] via
774+ sentinel value and the caller must [ wait] ( #waitables-and-waitable-sets ) via
775775waitable set until the subtask reaches a resolved state.
776776
777777The Component Model does not provide a mechanism to force prompt termination of
@@ -836,7 +836,7 @@ Despite the above, the following scenarios do behave deterministically:
836836 deterministically and immediately.
837837* When both ends of a stream or future are owned by wasm components, the
838838 behavior of all read, write, cancel and drop operations is deterministic
839- (modulo any nondeterminitic execution that determines the ordering in which
839+ (modulo any nondeterministic execution that determines the ordering in which
840840 the operations are performed).
841841
842842
@@ -939,7 +939,7 @@ Other example asynchronous lowered signatures:
939939| ` async func() ` | ` (func (result i32)) ` |
940940| ` async func() -> string ` | ` (func (param $out-ptr i32) (result i32)) ` |
941941| ` async func(x: f32) -> f32 ` | ` (func (param $x f32) (param $out-ptr i32) (result i32)) ` |
942- | ` async func(s: string, t: string) ` | ` (func (param $s-ptr i32) (param $s-len i32) (result $t-ptr i32) (param $t-len i32) (result i32)) ` |
942+ | ` async func(s: string, t: string) ` | ` (func (param $s-ptr i32) (param $s-len i32) (param $t-ptr i32) (param $t-len i32) (result i32)) ` |
943943
944944` future ` and ` stream ` can appear anywhere in the parameter or result types. For example:
945945``` wit
@@ -1174,8 +1174,8 @@ core wasm code between events, not externally-visible behavior.
11741174 ...
11751175 )
11761176 (core module $Main
1177- (import "libc " "mem" (memory 1))
1178- (import "libc " "realloc" (func (param i32 i32 i32 i32) (result i32)))
1177+ (import "" "mem" (memory 1))
1178+ (import "" "realloc" (func (param i32 i32 i32 i32) (result i32)))
11791179 (import "" "fetch" (func $fetch (param i32 i32 i32) (result i32)))
11801180 (import "" "waitable-set.new" (func $new_waitable_set (result i32)))
11811181 (import "" "waitable.join" (func $join (param i32 i32)))
@@ -1247,7 +1247,7 @@ It's also possible for `summarize` to call `task.return` called eagerly in the
12471247initial core ` summarize ` call.
12481248
12491249The ` $event ` , ` $p1 ` and ` $p2 ` parameters passed to ` cb ` are the same as the
1250- return values from ` task .wait` in the previous example. The precise meaning of
1250+ return values from ` waitable-set .wait` in the previous example. The precise meaning of
12511251these values is defined by the Canonical ABI.
12521252
12531253
@@ -1290,7 +1290,7 @@ comes after:
12901290[ Effect Type ] : https://en.wikipedia.org/wiki/Effect_system
12911291[ CPS Transform ] : https://en.wikipedia.org/wiki/Continuation-passing_style
12921292[ Asyncify ] : https://emscripten.org/docs/porting/asyncify.html
1293- [ Session Types ] : https://en.wikipedia.org/wiki/Session_type
1293+ [ Session Type ] : https://en.wikipedia.org/wiki/Session_type
12941294[ Structured Concurrency ] : https://en.wikipedia.org/wiki/Structured_concurrency
12951295[ Unit ] : https://en.wikipedia.org/wiki/Unit_type
12961296[ FS or GS Segment Base Address ] : https://docs.kernel.org/arch/x86/x86_64/fsgs.html
0 commit comments