title: HTML5/JS - Start several webworkers
body: <p>I'm currently writing on a program, where I have to deal with huge arrays. I can however split those arrays. My plan now is, to process the arrays in different web workers. I have however never worked with them and do have several questions:</p>
  
  <p><strong>1.</strong> How would I run several web workers? I tried a for-loop looking like that:</p>
  
  <pre><code>for(i = 0; i &lt; eD.threads; i++){
      //start workers here 
      var worker = new Worker("js/worker/imageValues.js");
      worker.postMessage(brightness, cD.pixels[i]);
  }
  </code></pre>
  
  <p>Here I do get the error, that the object couldn't be cloned. Which seems logical. I guess it would be better to save them in an Array?</p>
  
  <p><strong>2.</strong> How would I control that all have finished their work? (I need to reassembly the array and work with it later)</p>
  
  <p><strong>3.</strong> How many web workers really bring an improvement?</p>
  
  <p><strong>4.</strong> Is there any advanced tutorial, besides the MDN-entry?</p>
  
  <p>Thank you!</p>