- From: Chris Jones <cjones@mozilla.com>
- Date: Sat, 07 Nov 2009 02:42:34 -0600
Chris Jones wrote: > If I were writing a computationally-bound webapp, I would want an > interface like > > [main thread] > SharedWorker.parallelMap(workerfn [, ...]]) > > [worker thread] > function workerfn(myThreadIndex, numberOfworkerfns [, ...]) { > // partition problem dataset [...] based on |myThreadIndex| and > |numberOfworkerfns| > // compute > } > On second thought, I think that worker semantics dictate that the dataset partitioning decision should be made by [main thread] before the workers are spawned. But I don't think this significantly changes the API (move "// partition ..." into [main thread]). Cheers, Chris
Received on Saturday, 7 November 2009 00:42:34 UTC