After reading it over, I think we could reuse some code from the jobs implementation. We would especially need a way to wait synchronously for jobs.