title: how to run two async operation in one step in node.js as one atomic operation?
body: <p>I have function which call two async functions. The main function handle requests from the users. Here is example:</p>
  
  <pre><code>mainFunction(req, res, done) {
     asyncExist(req, function(exists) {
         if (!exists) {
             asyncCreate(req, done);
         }
     })
  }
  </code></pre>
  
  <p>The problem is when I have many requests. My main function is call async. Nodejs executes function asyncExist for many request before call function asyncCreate. In result asyncCreate function is call many times with the same parameters. Question is what to do with that fundamental problem?</p>