It should be possible to kill tasks via the future to ensure no further continuation is called.
This is useful for jobs that are started and access an object in the continuation, which will result in undefined behaviour if the object is gone by the time we get to the continuation.
API wise we could have:
- Future::kill that is called by the referenced object destructor
- Future::getHandle() that is a smart pointer so the job is automatically killed as soon as the handle dies.
- Future::addHandle(QObject/smart pointer) so the job is automatically killed as soon as the referenced object dies.