Re: [whatwg/dom] Abort controller (#437)

domenic commented on this pull request.



> +<a>context object</a>'s [=AbortSignal/aborted flag=] is set, and false otherwise.
+
+<p class=note>Changes to an {{AbortSignal}} object represent the wishes of the corresponding
+{{AbortController}} object, but an API observing the {{AbortSignal}} object can chose to ignore
+them. For instance, if the operation has already completed.
+
+<p>To <dfn export for=AbortSignal>signal abort</dfn>, given a {{AbortSignal}} object
+<var>signal</var>, run these steps:
+
+<ol>
+ <li><p>If <var>signal</var>'s [=AbortSignal/aborted flag=] is set, then return.
+
+ <li><p>Set <var>signal</var>'s [=AbortSignal/aborted flag=].
+
+ <li><p><a for=set>For each</a> <var>algorithm</var> in <var>signal</var>'s
+ [=AbortSignal/abort algorithms=]: run <var>algorithm</var>.

Hmm yeah, good point. We could do that, or we could go with a different strategy, of noting that abort algorithms will never fire after the aborted flag is set, so even though the spec doesn't clean them up explicitly, implementations probably should. I guess that's not as good though, once I typed it out.

-- 
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/pull/437#discussion_r116836287

Received on Tuesday, 16 May 2017 19:32:22 UTC