title: Triggering a long process by a user in a website
body: <p>I want to create a web page where users can initiate a process, this process will take several minutes to complete.</p>
  
  <blockquote>
    <p><strong>My question is:</strong><br>
    When the user clicks on a button, should I start the process on a different thread and send him to a different page? I don't want the process to end in case he closes the window or the connection is lost. </p>
  </blockquote>
  
  <p>Also how can I prevent other users from initiating this process.  </p>
  
  <p>I thought about putting a variable in the application state that indicates whether the process is currently running or not.</p>
  
  <p>Thanks for your advices</p>