This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Can two different event loops both have tasks from the same task source? The definition of task source says: All the tasks from one particular task source ... must always be added to the same task queue ... which implies that the answer is no, since that task queue can only belong to one event loop. (At least, I assume it can't be shared.) But I'm wondering if that definition should be interpreted as "within the context of a particular event loop", in which case the answer would be yes. Either way, the spec should probably be clearer.
I've tried updating the text. How is it now?
Checked in as WHATWG revision r7874. Check-in comment: Try to clarify event loop terminology. http://html5.org/tools/web-apps-tracker?from=7873&to=7874
Much clearer now. However, the new sentence: A task is intended for a specific event loop: the event loop that is handling tasks for the task's associated Document. implies that, for any given document, there is exactly one associated event loop (handling tasks for that document), but I'm not sure that's established anywhere. (E.g., what's the event loop for a document that doesn't have a browsing context? What prevents a document from having multiple associated event loops?) (Also, in the phrase: but tasks from different task sources may be placed in different task queues. the word "tasks" is marked up thusly: <span concept-task="" title="title=">tasks</span> which I'm guessing should be: <a href=#concept-task title=concept-task>task</a> )
> However, the new sentence: > > A task is intended for a specific event loop: the event loop > that is handling tasks for the task's associated Document. > > implies that, for any given document, there is exactly one associated > event loop (handling tasks for that document), but I'm not sure that's > established anywhere. (E.g., what's the event loop for a document that > doesn't have a browsing context? What prevents a document from having > multiple associated event loops?) It's established (near the definition of "event loop") that "there must be [...] at most one event loop per unit of related similar-origin browsing contexts", and I don't think it's possible for a Document, even one without a browsing context, to span multiple units of related similar-origin browsing contexts. Is that convincing enough?
Michael Dyck: I'm going to assume it is; please don't hesitate to reopen the bug if you disagree! Thanks!