- From: Scott Haseley <notifications@github.com>
- Date: Tue, 16 May 2023 17:16:21 -0700
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 17 May 2023 00:16:27 UTC
@shaseley commented on this pull request.
>
<p class=note>The [=AbortSignal/abort algorithms=] enable APIs with complex
requirements to react in a reasonable way to {{AbortController/abort()}}. For example, a given API's
[=AbortSignal/abort reason=] might need to be propagated to a cross-thread environment, such as a
service worker.
+<p>An {{AbortSignal}} object has a <dfn for="AbortSignal">dependent</dfn> (a boolean), which is
The difference has to do with empty signals and GC eligibility.
```js
const signal = AbortSignal.any([]);
…
const signal2 = AbortSignal.any([signal]);
```
`signal` is an "empty dependent signal", and such signals can never abort. When creating `signal2`, the "create a dependent signal" algorithm will not add `signal` as a source signal because its sources are empty; if we remove the "dependent" flag, it will. It's a minor difference that won't affect correctness, but it could affect GC eligibility.
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/1152#discussion_r1195801184
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/dom/pull/1152/review/1429607823@github.com>
Received on Wednesday, 17 May 2023 00:16:27 UTC