-
#include "tensorstore/util/future.h" -
template <typename Callback>
FutureCallbackRegistration
tensorstore::Promise<T>::ExecuteWhenNotNeeded(
Callback&& callback) const; Registers a callback to be invoked when
result_needed()becomesfalse.If
result_needed()isfalseupon invocation, the callback is executed immediately.Note
Typically, the specified
callbackfunction cancels pending work when invoked.