Looks similar to the code on the Async. Might make sense to make this a mixin.