#include "tensorstore/util/future.h"
template <typename T, typename U>
void tensorstore::SetDeferredResult(const Promise<T>promise,
                                    
U&result);

If promise does not already have a result set, sets its result to result and sets promise.result_needed() = false.

This does not cause promise.ready() to become true. The corresponding Future will become ready when the last Promise reference is released or when promise.SetReady() is called.