Chapter 4 - Recipe #9: Controlling a task finishing in an executor