implement futures for task_wrapper