[whatwg] Workers and queue of events
Dmitry Titov
dimich at chromium.org
Tue Nov 18 17:08:00 PST 2008
Pages communicate with their workers (dedicated) via queue of
events<http://www.whatwg.org/specs/web-workers/current-work/#the-queue>
.
What happens if the queue gets more and more events queued (as a result of
postMessage or timer callbacks) and the worker thread does not consume them
fast enough?
- setInterval can skip posting a callback if the previously posted one
was not yet consumed.
- setTimeout is probably ok as it is but if the worker script adds them
in a loop it can be a problem.
- postMessage could somehow indicate a queue overflow and ignore the
attempt to post a message if the queue length exceeds some specific
threshold.
Basically, the queue probably should have a limit on it and once the limit
is reached, the queue-based operations should start to fail, optionally with
some indication.
Dmitry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20081118/3f75c9e3/attachment.htm>
More information about the whatwg
mailing list