[whatwg] Calling Workers from Workers

On Sun, 20 Dec 2009 22:35:44 +0100, ATSUSHI TAKAYAMA  
<taka.atsushi at googlemail.com> wrote:

> Hi all,
>
> I'm wondering if calling (postMessage-ing to) Web Workers from a
> worker thread is possible.
>
> The use case I have in mind is to do a recursive calculation. So we're
> not only able to do this;
>
> - Main Thread (waits for results from workers)
> -- Worker 1
> -- Worker 2
> -- Worker 3
>
> but also able to do this kind of thing;
>
> - Main Thread (waits for results from it's own workers)
> -- Worker 1 (waits for results from it's own workers)
> --- Worker 1-1
> --- Worker 1-2
> --- Worker 1-3 (waits for results from it's own workers)
> ---- Worker 1-3-1
> ---- Worker 1-3-2
> ---- Worker 1-3-3
> -- Worker 2 (waits for results from it's own workers)
> --- Worker 2-1
> --- Worker 2-2
> --- Worker 2-3
> -- Worker 3 (no more recursion)

Sure. The spec has an example of this (1.2.5 Delegation).

-- 
Simon Pieters
Opera Software

Received on Sunday, 20 December 2009 21:14:41 UTC