[whatwg] Workers and queue of events
robert at ocallahan.org
Tue Nov 18 17:32:40 PST 2008
On Wed, Nov 19, 2008 at 2:08 PM, Dmitry Titov <dimich at chromium.org> wrote:
> 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
> 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.
How is this different from any other out-of-memory situation? Web APIs
generally don't specify OOM behaviour.
"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the whatwg