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 24599 - Don't these task queues depend on the available APIs? E.g. I suppose for file APIs we'll have some kind of "file read task source" and maybe an "IO task source".
Summary: Don't these task queues depend on the available APIs? E.g. I suppose for file...
Status: RESOLVED WORKSFORME
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: 2014-02-10 14:42 UTC by contributor
Modified: 2014-04-15 10:20 UTC (History)
3 users (show)

See Also:


Attachments

Description contributor 2014-02-10 14:42:54 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/workers.html
Multipage: http://www.whatwg.org/C#worker-event-loop
Complete: http://www.whatwg.org/c#worker-event-loop
Referrer: http://www.whatwg.org/specs/web-apps/current-work/multipage/

Comment:
Don't these task queues depend on the available APIs? E.g. I suppose for file
APIs we'll have some kind of "file read task source" and maybe an "IO task
source".

Posted from: 82.130.78.44 by annevk@annevk.nl
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:30.0) Gecko/20100101 Firefox/30.0
Comment 1 Ian 'Hixie' Hickson 2014-02-10 21:41:28 UTC
I don't understand what you are asking here. Can you elaborate?
Comment 2 Anne 2014-02-11 13:34:46 UTC
The introductory text seems unnecessarily restrictive: "This event loop has no associated browsing context, and its task queues only have events, callbacks, and networking activity as tasks." I suspect there may be many more kinds of tasks going forward.
Comment 3 Ian 'Hixie' Hickson 2014-02-11 19:46:07 UTC
Like what kind of task?
Comment 4 Anne 2014-02-12 11:15:46 UTC
File read task. Disk IO task. See comment 0.
Comment 5 Ian 'Hixie' Hickson 2014-02-12 17:24:44 UTC
Why would you queue a task to read a file or do disk I/O? That makes no sense. It'd be done in the background, no? (Note that "network activity" tasks are really just callbacks, not network activity. A fetch for a file:// with disk I/O would queue these "network activity" callback tasks.)
Comment 6 Anne 2014-02-12 17:42:27 UTC
Right, they would be callbacks that can be used by FileReader to read a blob. That would not go through fetch, but through "blob read" or some such.
Comment 7 Ian 'Hixie' Hickson 2014-02-14 22:00:42 UTC
Right. So, a callback. Like the spec says: "... only have events, callbacks, and networking activity as tasks". Network activity is only mentioned because of the weird way "fetch" works, but things like FileReader don't get used for anything but regular callbacks, so they don't need anything special mentioned here.
Comment 8 Ian 'Hixie' Hickson 2014-02-21 22:19:30 UTC
I don't know what to do to the spec to fix this. If there's specific specs that queue specific new kinds of tasks that aren't mentioned in the HTML spec, then please let me know. Otherwise, I guess this is WORKSFORME.
Comment 9 Anne 2014-03-17 14:20:31 UTC
That's not true. E.g. if you have async XMLHttpRequest that you feed a Blob, it will use the tasks queued by reading the Blob to send that data over the network. No callbacks involved.
Comment 10 Ian 'Hixie' Hickson 2014-03-17 19:35:51 UTC
Why would those use tasks at all?
Comment 11 Anne 2014-03-17 20:42:19 UTC
What's the alternative? Some kind of English prose that says you do a synchronous read in the background? I guess that could work too...
Comment 12 Ian 'Hixie' Hickson 2014-03-18 18:36:48 UTC
If it's just happening in the background, who cares what the timing is. You only need to use tasks when it would otherwise expose author-visible races.
Comment 13 Ian 'Hixie' Hickson 2014-04-14 21:44:29 UTC
Anne, I still don't really understand what you want me to do here.
Comment 14 Anne 2014-04-15 10:20:45 UTC
I guess it's fine. The current sentence seems overly restrictive, but maybe network is indeed the only special case...