Skip to content

Commit 70f2e56

Browse files
committed
Remove some boilerplate text from Explainer.md that is better-explained by Concurrency.md and CanonicalABI.md
1 parent 925a943 commit 70f2e56

1 file changed

Lines changed: 5 additions & 30 deletions

File tree

design/mvp/Explainer.md

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1723,14 +1723,6 @@ If `cancellable` is set, `waitable-set.wait` may return `task-cancelled`
17231723
`task-cancelled` is returned at most once for a given task and thus must be
17241724
propagated once received.
17251725

1726-
If `waitable-set.wait` is called from a synchronous- or `async callback`-lifted
1727-
export, no other threads that were implicitly created by a separate
1728-
synchronous- or `async callback`-lifted export call can start or progress in
1729-
the current component instance until `waitable-set.wait` returns (thereby
1730-
ensuring non-reentrance of the core wasm code). However, explicitly-created
1731-
threads and threads implicitly created by non-`callback` `async`-lifted
1732-
("stackful async") exports may start or progress at any time.
1733-
17341726
A `subtask` event notifies the supertask that its subtask is now in the given
17351727
state (the meanings of which are described by the [concurrency explainer]).
17361728

@@ -2116,12 +2108,11 @@ For details, see [Thread Built-ins] in the concurrency explainer and
21162108
| Approximate WIT signature | `func<cancellable?>() -> bool` |
21172109
| Canonical ABI signature | `[] -> [i32]` |
21182110

2119-
The `thread.suspend` built-in suspends the [current thread] which,
2120-
depending on the calling context, will either immediately switch control flow
2121-
to an `async`-lowered caller or, if the current task has already suspended
2122-
before, switch to the runtime's scheduler to find something else to do. If
2123-
`cancellable` is set, `thread.suspend` returns whether the current task was
2124-
[cancelled] by the caller; otherwise, `thread.suspend` always returns `false`.
2111+
The `thread.suspend` built-in suspends the [current thread] until it is
2112+
explicitly resumed by some other thread calling a built-in such as
2113+
`thread.resume-later`. If `cancellable` is set, `thread.suspend` returns whether
2114+
the current task was [cancelled] by the caller; otherwise, `thread.suspend`
2115+
always returns `false`.
21252116

21262117
A non-`async`-typed function export that has not yet returned a value traps if
21272118
it transitively attempts to call `thread.suspend`.
@@ -2166,14 +2157,6 @@ state. If `cancellable` is set, `thread.switch-to` returns whether the current
21662157
task was [cancelled] by the caller; otherwise, `thread.switch-to` always returns
21672158
`false`.
21682159

2169-
If `thread.switch-to` is called from a synchronous- or `async callback`-lifted
2170-
export, no other threads that were implicitly created by a separate
2171-
synchronous- or `async callback`-lifted export call can start or progress in
2172-
the current component instance until `thread.switch-to` returns (thereby
2173-
ensuring non-reentrance of the core wasm code). However, explicitly-created
2174-
threads and threads implicitly created by non-`callback` `async`-lifted
2175-
("stackful async") exports may start or progress at any time.
2176-
21772160
For details, see [Thread Built-ins] in the concurrency explainer and
21782161
[`canon_thread_switch_to`] in the Canonical ABI explainer.
21792162

@@ -2191,14 +2174,6 @@ thread at some point in the future. If `cancellable` is set, `thread.yield-to`
21912174
returns whether the current task was [cancelled] by the caller; otherwise,
21922175
`thread.yield-to` always returns `false`.
21932176

2194-
If `thread.yield-to` is called from a synchronous- or `async callback`-lifted
2195-
export, no other threads that were implicitly created by a separate
2196-
synchronous- or `async callback`-lifted export call can start or progress in
2197-
the current component instance until `thread.yield-to` returns (thereby
2198-
ensuring non-reentrance of the core wasm code). However, explicitly-created
2199-
threads and threads implicitly created by non-`callback` `async`-lifted
2200-
("stackful async") exports may start or progress at any time.
2201-
22022177
For details, see [Thread Built-ins] in the concurrency explainer and
22032178
[`canon_thread_yield_to`] in the Canonical ABI explainer.
22042179

0 commit comments

Comments
 (0)