This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 20041 - Please be explicit about the different event loops.
Summary: Please be explicit about the different event loops.
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-22 10:58 UTC by contributor
Modified: 2013-04-12 22:33 UTC (History)
3 users (show)

See Also:


Attachments

Description contributor 2012-11-22 10:58:51 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html
Multipage: http://www.whatwg.org/C#the-workerglobalscope-common-interface
Complete: http://www.whatwg.org/c#the-workerglobalscope-common-interface

Comment:
Please be explicit about the different event loops.

Posted from: 81.231.170.159
User agent: Opera/9.80 (Macintosh; Intel Mac OS X 10.5.8; U; en) Presto/2.10.229 Version/11.61
Comment 1 Simon Pieters 2012-11-22 11:00:25 UTC
Since workers have a special event loop, it might be a good idea to have a special name for it, e.g. "worker event loop", and xref that.
Comment 2 Ian 'Hixie' Hickson 2012-11-22 19:27:17 UTC
Could you elaborate on this? In most places, I really want to be able to just refer to "the event loop" and have it refer to the worker or document one as appropriate, without having to worry about which it is.
Comment 3 Simon Pieters 2012-11-22 19:43:00 UTC
Maybe it's easier for you, but it's confusing for me when I try to understand what the spec says for the purpose of writing tests.

In the Web worker section, I think all instances of "event loop" mean "worker event loop".

In the Cross-document messaging section, I only find one instance of "event loop", and there it can point to both if it can be either.
Comment 4 Simon Pieters 2012-11-22 19:48:56 UTC
I realize there are other features that interact with the event loop and are available in both contexts, like WebSockets. I'm fine with WebSockets referring to "event loop" to mean either, since it only does something in one context. However, the Web Workers and Cross-document messaging sections do stuff in both contexts, and there it would be helpful to be explicit.
Comment 5 contributor 2013-02-06 00:24:11 UTC
Checked in as WHATWG revision r7696.
Check-in comment: Integrate the 'event loop' mechanism of workers and windows together, and try to specify which is meant when it might be ambiguous.
http://html5.org/tools/web-apps-tracker?from=7695&to=7696
Comment 6 Ian 'Hixie' Hickson 2013-02-06 00:24:32 UTC
Can you take a look at the spec again and let me know if you still think it's got issues? I'm not 100% sure how to fix it beyond this.
Comment 7 Simon Pieters 2013-03-04 22:53:33 UTC
Looks good. Thanks!
Comment 8 Ian 'Hixie' Hickson 2013-04-12 22:33:50 UTC
marking fixed per comment 7