I ran into a use case where I wanted to add a reference id to a task, so that I could look up the related record after the task completed. The straightforward solution to this is to add an optional result property to AsyncTask, which is the return value of the generator function passed into runTask().