title: Is the following node.js code blocking or non-blocking?
body: <p>I have the node.js code running on a server and would like to know if it is blocking or not.  It is kind of similar to this:</p>
  
  <pre><code>function addUserIfNoneExists(name, callback) {
      userAccounts.findOne({name:name}, function(err, obj) {
          if (obj) {
              callback('user exists');
          } else {
  
              // Add the user 'name' to DB and run the callback when done.
              // This is non-blocking to here.
              user = addUser(name, callback)
  
              // Do something heavy, doesn't matter when this completes.
              // Is this part blocking?
              doSomeHeavyWork(user);
          }
      });
  };
  </code></pre>
  
  <p>Once <code>addUser</code> completes the <code>doSomeHeavyWork</code> function is run and eventually places something back into the database.  It does not matter how long this function takes, but it should not block other events on the server.</p>
  
  <p>With that, is it possible to test if node.js code ends up blocking or not?</p>