title: threads, tasks, states, need help picking the right one
body: <p>I need some help in choosing the right tool. I'm replacing the hardware controller that controls some pumps with a raspberry pi and writing code for it in c# .netcore. The pumps should run in a specific sequence and for a specified duration. With all the possible ways to accomplish this, I'm looking for the cleanest and interesting one.</p>
  
  <p>The pumps should do the following:</p>
  
  <ul>
  <li>Turn on pump 1</li>
  <li>wait 15 seconds</li>
  <li>turn on pump 2</li>
  <li>wait 10 minutes</li>
  <li>turn on pump 3</li>
  <li>let pump 3 run for 20 minutes</li>
  <li>turn off pump 3</li>
  <li>wait 10 minutes</li>
  <li>turn off pump 2</li>
  <li>wait 15 seconds</li>
  <li>turn off pump 1</li>
  </ul>
  
  <p>I looked into timers, threads, tasks, state machine but I have a hard time picking the right tool for this job. At all times, I also need to be able to stop immediately all pumps.</p>
  
  <p>Thanks for your help.</p>