[whatwg] Calling Workers from Workers

ATSUSHI TAKAYAMA taka.atsushi at googlemail.com
Sun Dec 20 13:35:44 PST 2009


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)

Thanks,
Atsushi TAKAYAMA



More information about the whatwg mailing list