@@ -74,16 +74,6 @@ the same way that they already bind to various OS's concurrent I/O APIs (such
7474as ` select ` , ` epoll ` , ` io_uring ` , ` kqueue ` and Overlapped I/O) making the
7575Component Model "just another OS" from the language toolchain's perspective.
7676
77- The new async ABI can be used alongside or instead of the existing Preview 2
78- "sync ABI" to call or implement * any* WIT function type. When * calling* an
79- imported function via the async ABI, if the callee [ blocks] ( #blocking ) , control
80- flow is returned immediately to the caller, and the callee continues executing
81- concurrently. When * implementing* an exported function via the async ABI,
82- multiple concurrent export calls are allowed to be made by the caller.
83- Critically, both sync-ABI-calls-async-ABI and async-ABI-calls-sync-ABI pairings
84- have well-defined, composable behavior for both inter-component and
85- intra-component calls.
86-
8777In addition to adding a new async * ABI* for use by the language's compiler and
8878runtime, the Component Model also adds a new ` async ` [ effect type] that can be
8979added to function types (in both WIT and raw component function type
@@ -103,6 +93,16 @@ invariant is necessary to allow non-`async` component exports to be called in
10393synchronous contexts (like event listeners, callbacks, getters, setters and
10494constructors).
10595
96+ The new async ABI can be used alongside or instead of the existing Preview 2
97+ "sync ABI" to call or implement any ` async ` -typed functions. When * calling* an
98+ imported function via the async ABI, if the ` async ` callee [ blocks] ( #blocking ) ,
99+ control flow is returned immediately to the caller, and the callee continues
100+ executing concurrently. When * implementing* an ` async ` function via the async
101+ ABI, multiple concurrent export calls are allowed to be made by the caller.
102+ Critically, both sync-ABI-calls-async-ABI and async-ABI-calls-sync-ABI pairings
103+ have well-defined, composable behavior for both inter-component and
104+ intra-component calls.
105+
106106Because ` async ` function exports may be implemented with the * sync* ABI and
107107then call ` async ` function imports using the * sync* ABI, traditional sync code
108108can compile directly to components exporting ` async ` functions without having
@@ -873,19 +873,12 @@ JS [top-level `await`] or I/O in C++ constructors executing during `start`.
873873
874874## Async ABI
875875
876- At an ABI level, native async in the Component Model defines for every WIT
877- function an async-oriented core function signature that can be used instead of
878- or in addition to the existing (Preview-2-defined) synchronous core function
879- signature. This async-oriented core function signature is intended to be called
880- or implemented by generated bindings which then map the low-level core async
881- protocol to the languages' higher-level native concurrency features.
882-
883- Note that * every* WIT-level function type can be lifted and lowered using the
884- async (or sync) ABI. While calling a non-` async ` -typed function import using
885- the async ABI will never returned that the call "blocked" (as guaranteed by the
886- Component Model trapping if the callee would have blocked), the async ABI is
887- still allowed to be used (for the benefit of code generators that only want
888- to think about one ABI).
876+ At an ABI level, native async in the Component Model defines for every
877+ ` async ` -typed function a non-blocking core function signature that can be
878+ used instead of or in addition to the existing (Preview-2-defined) synchronous
879+ core function signature. This non-blocking core function signature is intended
880+ to be called or implemented by generated bindings which then map the low-level
881+ core async protocol to the languages' higher-level native concurrency features.
889882
890883### Async Import ABI
891884
0 commit comments