This is more flexible than the previous implementation (which was basically an oneshot_event that carried a value), and it disentangles the result<T> implementation from promise<T>.