tensorstore.Future.add_done_callback(self, callback: Callable[[Future], None]) None

Registers a callback to be invoked upon completion of the asynchronous operation.

callback: Callable[[Future], None]

Callback to invoke with self when this future becomes ready.


Unlike asyncio.Future.add_done_callback, but like concurrent.futures.Future.add_done_callback, the callback may be invoked from any thread. If using asyncio and callback needs to be invoked from a particular event loop, wrap callback with asyncio.loop.call_soon_threadsafe.