# tensorplay.futures API Source: https://www.tensorplay.cn/docs/api/tensorplay.futures.html ## Functions 2 [#](#api-tensorplay.futures.collect_all) ### collect_all function[Full reference ↗](/docs/generated/tensorplay.futures.collect_all.html) ```python tensorplay.futures.collect_all(futures: Sequence[Future[_T]]) → Future[list[Future[_T]]] ``` Return a future completed after every input future is complete. [#](#api-tensorplay.futures.wait_all) ### wait_all function[Full reference ↗](/docs/generated/tensorplay.futures.wait_all.html) ```python tensorplay.futures.wait_all(futures: Sequence[Future[_T]]) → list[_T] ``` Wait for all input futures and return their values in input order. ## Classes 1 [#](#api-tensorplay.futures.Future) ### Future class[Full reference ↗](/docs/generated/tensorplay.futures.Future.html) ```python class tensorplay.futures.Future ``` A native future value with callback and exception support. ```python add_done_callback(self: object, callback: collections.abc.Callable) → None ``` ```python done(self: tensorplay._C.Future) → bool ``` ```python is_done(self: tensorplay._C.Future) → bool ``` ```python set_result(self: tensorplay._C.Future, result: object) → None ``` ```python then(self: object, callback: collections.abc.Callable) → tensorplay._C.Future ``` ```python value(self: tensorplay._C.Future) → object ``` ```python wait(self: tensorplay._C.Future) → object ```