- From: James Browning <notifications@github.com>
- Date: Thu, 11 Feb 2021 13:34:37 -0800
- To: whatwg/dom <dom@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <whatwg/dom/issues/948/777806885@github.com>
> That isn't true? `aborted` can only be observed on the main thread, and if author JavaScript is running on the main thread, then web API browser code cannot be. I mean they don't necessarily go via `.aborted`, but there's this note that implies that they can observe it basically anytime they need: > The abort algorithms enable APIs with complex requirements to react in a reasonable way to abort(). For example, a given API’s aborted flag might need to be propagated to a cross-thread environment, such as a service worker. > It violates the run to completion semi-invariant, which can currently only be violated by the very special object `SharedArrayBuffer`. Yes this is what I'm currently using for aborting in compute loops in workers, but it is a bit annoying not to be able to use the same API on one side that is used throughout the rest of the code. Also my proposal doesn't actually violate run to completion, as it doesn't allow any additional JS code to run at the same time, in this regard is isn't significantly different to `Date.now() !== Date.now()` or `Math.random() !== Math.random()` or the recently shipped in Chrome `scheduler.isInputPending !== scheduler.isInputPending`. -- 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-777806885
Received on Thursday, 11 February 2021 21:34:49 UTC