@@ -565,7 +565,7 @@ per `ResourceHandle`.
565565
566566The ` num_lends ` field maintains a conservative approximation of the number of
567567live handles that were lent from this ` own ` handle (by calls to ` borrow ` -taking
568- functions). This count is maintained by the ` ImportCall ` bookkeeping functions
568+ functions). This count is maintained by the ` Subtask ` bookkeeping functions
569569(above) and is ensured to be zero when an ` own ` handle is dropped.
570570
571571The ` ResourceType ` class represents a runtime instance of a resource type that
@@ -666,7 +666,7 @@ class Thread:
666666The ` index ` field stores the index of the thread in its containing component
667667instance's ` threads ` table and is initialized only once a thread is allowed to
668668start executing (after the backpressure gate). The ` storage ` field holds the
669- [ thread-local storage] accessed by the ` storage .{get,set}` built-ins. All the
669+ [ thread-local storage] accessed by the ` context .{get,set}` built-ins. All the
670670other fields are used directly by ` Thread ` methods as shown next.
671671
672672When a ` Thread ` is created, an internal ` threading.Thread ` is started and
@@ -1765,7 +1765,7 @@ class SharedFutureImpl(ReadableFuture, WritableFuture):
17651765 pending_on_copy_done(result)
17661766
17671767 def cancel (self ):
1768- self .reset_pending_and_notify_pending (CopyResult.CANCELLED )
1768+ self .reset_and_notify_pending (CopyResult.CANCELLED )
17691769```
17701770Dropping works the same in futures as in streams, except that a future
17711771writable end cannot be dropped without having written a value. This is guarded
@@ -2439,7 +2439,7 @@ The integral value of a `char` (a [Unicode Scalar Value]) is a valid unsigned
24392439``` python
24402440def char_to_i32 (c ):
24412441 i = ord (c)
2442- assert (0 <= i <= 0x D7FF or 0x D800 <= i <= 0x 10FFFF )
2442+ assert (0 <= i <= 0x D7FF or 0x E000 <= i <= 0x 10FFFF )
24432443 return i
24442444```
24452445
@@ -2839,7 +2839,7 @@ def flatten_types(ts, opts):
28392839 return [ft for t in ts for ft in flatten_type(t, opts)]
28402840```
28412841As shown here, the core signatures ` async ` functions use a lower limit on the
2842- maximum number of parameters (1 ) and results (0) passed as scalars before
2842+ maximum number of parameters (4 ) and results (0) passed as scalars before
28432843falling back to passing through memory.
28442844
28452845Presenting the definition of ` flatten_type ` piecewise, we start with the
@@ -3366,7 +3366,7 @@ In both of the `async` cases below (with or without `callback`), the
33663366` task.return ` built-in must be called, providing the return value as core wasm
33673367* parameters* to the ` task.return ` built-in (rather than as core function
33683368results as in the synchronous case). If ` task.return ` is * not* called by the
3369- time the ` Task ` 's last ` Thread ` exits, there is a trap (in ` Task.thread_stop ` ).
3369+ time the ` Task ` 's last ` Thread ` exits, there is a trap (in ` Task.unregister_thread ` ).
33703370
33713371In the ` async ` non-` callback ` ("stackful async") case, there is a single call
33723372to the core wasm callee which must return empty core results. Waiting for async
@@ -4491,13 +4491,13 @@ If the copy hasn't been cancelled, the synchronous case suspends the thread to
44914491wait for one of the ` on_* ` callbacks to eventually be called (which will set
44924492the pending event).
44934493
4494- The asynchronous case simply returns ` BLOCKING ` and the client code must wait
4494+ The asynchronous case simply returns ` BLOCKED ` and the client code must wait
44954495as usual for a ` {STREAM,FUTURE}_{READ,WRITE} ` event. In this case, cancellation
44964496has served only to asynchronously request that the host relinquish the buffer
44974497ASAP without waiting for anything to be read or written.
44984498
4499- If ` BLOCKING ` is * not* returned, the pending event (which is necessarily a
4500- ` stream_event ` ) is eagerly delivered to core wasm as the return value, thereby
4499+ If ` BLOCKED ` is * not* returned, the pending event (which is necessarily a
4500+ ` stream_event ` or ` future_event ` ) is eagerly delivered to core wasm as the return value, thereby
45014501saving an additional turn of the event loop. In this case, the core wasm
45024502caller can assume that ownership of the buffer has been returned.
45034503
0 commit comments