Future.result()
Future.result() is a Python method in the Concurrent Module category. Returns the result of the callable when complete. Blocks if not yet done. The syntax is future.result(timeout=None). Parameters: timeout — seconds. Returns: Callable result. A typical example: result = future.result(timeout=5.0) # Wait up to 5s. A close sibling is concurrent.futures.ThreadPoolExecutor(), which creates a thread pool for executing callables asynchronously. A close sibling is concurrent.futures.ProcessPoolExecutor(), which creates a process pool for CPU-bound parallel execution. A close sibling is Executor.submit(), which schedules a callable to be executed and returns a Future. A close sibling is Executor.map(), which maps a function across iterables in parallel (like built-in map). More about this category: Thread/process pools — ThreadPoolExecutor, ProcessPoolExecutor, Future. Related Concurrent Module entries: concurrent.futures.ThreadPoolExecutor(), concurrent.futures.ProcessPoolExecutor(), Executor.submit(), Executor.map(), Future.done(), Future.cancel(). This page is part of the free Python Reference documentation covering 978+ functions, methods, and modules with examples and parameter details.