tensorstore.Promise.set_result(self, result: object) None

Marks the linked future as successfully completed with the specified result.

Example

>>> promise, future = ts.Promise.new()
>>> future.done()
False
>>> promise.set_result(5)
>>> future.done()
True
>>> future.result()
5