Re: [whatwg/dom] Allow postMessage-ing AbortSignal (#948)

> Wouldn't that mean that `signal.aborted !== signal.aborted` sometimes? 

Yes. Although once `true`, always `true`.

> I don't think we want that.

Is there any particular reason? Web APIs that accept `AbortSignal` could already observe such behaviour if they wanted to, this would simply allow work in other userland threads (workers) to be able to behave similarly. The spec already [explictly allows this behaviour](https://dom.spec.whatwg.org/#note%20no-backref).

And from what I've found, doing a macrotask to allow any asynchronous notifications to come through actually kills performance quite heavily in some cases (compared to `Atomics.load()`). Although this concern could be separately addressed by an API that allows fast checking for any pending worker messages (e.g. `if (self.areMessagesPending) { await self.yield(); }`).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/948#issuecomment-777309861

Received on Thursday, 11 February 2021 09:30:52 UTC