title: Do one dispatch task at a time and cancel current when new starts
body: <p>I have an asynchronous task, I want to perform, and whenever a task is requested, it should make obsolete all previous tasks. This means I want to only ever run one such task at a time and cancel the previous one when a new one starts.</p>
  
  <p><strong>Example:</strong></p>
  
  <p>Users presses a button to calculate something. Controller calculates while user changes input data and presses button again. The first calculation should be canceled and a new one should start with the fresh input.</p>
  
  <p>Is this pattern reasonable? What are common patterns to implement this? Is there a straightforward mapping of this to <code>DispatchQueue</code>/<code>OperationQueue</code>?</p>