- From: Glenn Maynard <glenn@zewt.org>
- Date: Fri, 8 Aug 2014 14:56:30 -0500
- To: adelespinasse@gmail.com
- Cc: public-webapps WG <public-webapps@w3.org>
Received on Friday, 8 August 2014 19:56:58 UTC
On Fri, Aug 8, 2014 at 12:49 PM, Alan deLespinasse <adelespinasse@gmail.com>
wrote:
> I would find it extremely useful to have a function available to a Worker
> that would block and wait for a message from another Worker or from the
> main thread. For example, instead of:
>
> onmessage = function(event) {
> // Do some work
> // Save all state for next time
> };
>
> I'd like to have something like this:
>
> while (true) {
> var data = waitForMessage().data;
> // Do some work
> }
>
> or:
>
> var subworker = new Worker('subworker.js');
> while (true) {
> var data = subworker.waitForMessage().data;
> // Do some work
> }
>
There have probably been other threads since, but here's a starting point:
http://lists.w3.org/Archives/Public/public-webapps/2010OctDec/1075.html
--
Glenn Maynard
Received on Friday, 8 August 2014 19:56:58 UTC