Skip to content

Commit 537f512

Browse files
abrownlukewagner
authored andcommitted
Fix line wrapping
1 parent 44c9986 commit 537f512

File tree

2 files changed

+19
-16
lines changed

2 files changed

+19
-16
lines changed

design/mvp/CanonicalABI.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3788,8 +3788,8 @@ For a canonical definition:
37883788
validation specifies:
37893789
* `$ft` must refer to a `shared` function type; initially, only the type
37903790
`(shared (func (param $c i32)))` is allowed (see explanation below)
3791-
* `$spawn_ref` is given type `(func (param $f (ref null $ft)) (param $c i32) (result $e
3792-
i32))`.
3791+
* `$spawn_ref` is given type `(func (param $f (ref null $ft)) (param $c i32)
3792+
(result $e i32))`.
37933793

37943794
> Note: ideally, a thread could be spawned with [arbitrary thread parameters].
37953795
> Currently, that would require additional work in the toolchain to support so,
@@ -3836,12 +3836,14 @@ validation specifies:
38363836
* `$ft` must refer to a `shared` function type; initially, only the type
38373837
`(shared (func (param $c i32)))` is allowed (see explanation in
38383838
`thread.spawn_ref` above)
3839-
* `$tbl` must refer to a table with type `(table (ref null (shared func)) shared)`
3840-
* `$spawn_indirect` is given type `(func (param $i i32) (param $c i32) (result $e
3841-
i32))`.
3839+
* `$tbl` must refer to a table with type `(table (ref null (shared func))
3840+
shared)`
3841+
* `$spawn_indirect` is given type `(func (param $i i32) (param $c i32) (result
3842+
$e i32))`.
38423843

3843-
Calling `$spawn_indirect` retrieves a reference to function `$f` from table `$tbl` and checks
3844-
that `$f` is of type `$ft`. If that succeeds, it spawns a thread which:
3844+
Calling `$spawn_indirect` retrieves a reference to function `$f` from table
3845+
`$tbl` and checks that `$f` is of type `$ft`. If that succeeds, it spawns a
3846+
thread which:
38453847
- invokes `$f` with `$c`
38463848
- executes `$f` until completion or trap in a `shared` context as described by
38473849
the [shared-everything threads] proposal.

design/mvp/Explainer.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1948,9 +1948,9 @@ Web/JS APIs.
19481948

19491949
###### 🧵 `thread.spawn_ref`
19501950

1951-
| Synopsis | |
1952-
| -------------------------- | --------------------------------------------------------- |
1953-
| Approximate WIT signature | `func<FuncT>(f: FuncT, c: FuncT.params[0]) -> bool` |
1951+
| Synopsis | |
1952+
| -------------------------- | ---------------------------------------------------------- |
1953+
| Approximate WIT signature | `func<FuncT>(f: FuncT, c: FuncT.params[0]) -> bool` |
19541954
| Canonical ABI signature | `[f:(ref null (shared (func (param i32))) c:i32] -> [i32]` |
19551955

19561956
The `thread.spawn_ref` built-in spawns a new thread by invoking the shared
@@ -1970,9 +1970,9 @@ future, the type of `c` is currently hard-coded to always be `i32`.
19701970

19711971
The `thread.spawn_indirect` built-in spawns a new thread by retrieving the
19721972
shared function `f` from a table using index `i` and traps if the type of `f` is
1973-
not equal to `FuncT` (much like the `call_indirect`
1974-
core instruction). Once `f` is retrieved, this built-in operates like
1975-
`thread.spawn_ref` above, including the limitations on `f`'s parameters.
1973+
not equal to `FuncT` (much like the `call_indirect` core instruction). Once `f`
1974+
is retrieved, this built-in operates like `thread.spawn_ref` above, including
1975+
the limitations on `f`'s parameters.
19761976

19771977
(See also [`canon_thread_spawn_indirect`] in the Canonical ABI explainer.)
19781978

@@ -1983,14 +1983,15 @@ core instruction). Once `f` is retrieved, this built-in operates like
19831983
| Approximate WIT signature | `func() -> u32` |
19841984
| Canonical ABI signature | `[] -> [i32]` |
19851985

1986-
The `thread.available_parallelism` built-in returns the number of threads that can be
1987-
expected to execute in parallel.
1986+
The `thread.available_parallelism` built-in returns the number of threads that
1987+
can be expected to execute in parallel.
19881988

19891989
The concept of "available parallelism" corresponds is sometimes referred to
19901990
as "hardware concurrency", such as in [`navigator.hardwareConcurrency`] in
19911991
JavaScript.
19921992

1993-
(See also [`canon_thread_available_parallelism`] in the Canonical ABI explainer.)
1993+
(See also [`canon_thread_available_parallelism`] in the Canonical ABI
1994+
explainer.)
19941995

19951996
### 🪙 Value Definitions
19961997

0 commit comments

Comments
 (0)