pgriess / node-webworker

A WebWorkers implementation for NodeJS
BSD 3-Clause "New" or "Revised" License
646 stars 84 forks source link

How to parallelize tasks using web-worker? #13

Closed rbhogi closed 13 years ago

rbhogi commented 13 years ago

Hi,

I have following simple program. I am looking to parallelize this program using web-worker.

function process(delay){ var start = new Date(); var len = 300000*delay; for(var i=0;i<len;i++){}; return (new Date()-start); }

var start = new Date(); process(500); process(600); console.log("Time taken :"+(new Date()-start));

pgriess commented 13 years ago

Not a bug.