title: Can someone explain the webworker-thread example?
body: <pre><code>var Worker = require('webworker-threads').Worker;
  require('http').createServer(function (req,res) {
    var fibo = new Worker(function() {
      function fibo (n) {
        return n &gt; 1 ? fibo(n - 1) + fibo(n - 2) : 1;
      }
  
      // which onmessage does this this refer to?
      onmessage = function (event) {  //reference 1
        postMessage(fibo(event.data));
      }
    });
    fibo.onmessage = function (event) { //reference 2
      res.end('fib(40) = ' + event.data);
    };
    fibo.postMessage(40);
  }).listen(port);
  </code></pre>
  
  <p>This is the code found as an example for the webworker class.</p>
  
  <p>I was looking at the API and doen't seem to understand what reference 1 in the above code is referring to. Why does the postMessage(40) hit the inner onmessage function and not the fibo.onmessage function?</p>