Future
A future is an abstraction representing an asynchronous computation’s result, which may become available later and may be pending or complete.
C++ Concurrency in Action, Second Edition
An object representing a value that may become available later, often as the result of asynchronous work.
- How it is used
- Synchronizes one-off events and transfers results or failures between concurrent operations.
- How deep it goes
- Works through producers, retrieval, exceptions, and continuations using C++ examples rather than detailing future implementation internals.
- Examples
- Uses a background calculation, parallel quicksort, network connections, login processing, and parallel accumulation.
- What you can do after
- Apply it via `std::async`, `std::promise`, or `std::packaged_task` to collect asynchronous results and exceptions.
Read how C++ Concurrency in Action, Second Edition explains future →
Rust Servers, Services, and Apps
The Rust Future trait defines the interface for an asynchronous computation that can be polled toward completion.
- How it is used
- Connects deferred computations to concurrent task scheduling in Rust web services.
- How deep it goes
- Works through the trait signature, polling, waking, and a custom timer, while leaving Pin’s deeper mechanics aside.
- Examples
- Uses concurrent file-read simulations and a custom expiration timer to show pending and ready results.
- What you can do after
- Build it from scratch: implement a timer future that returns pending, wakes its task, and eventually returns a value.
Python Concurrency with asyncio
A future is an object representing the eventual result or exception of an asynchronous operation that may not yet be complete.
- How it is used
- Coordinates deferred results in asyncio and exposes completion to await expressions and APIs that return futures.
- How deep it goes
- Defines states, result handling, awaiting, inheritance, and custom __await__ mechanics, but does not develop custom awaitables beyond a basic implementation.
- Examples
- Uses direct result assignment, delayed web-request simulation, a responsive URL stress tester, and a custom future driven by an event loop.
- What you can do after
- Apply it via asyncio by awaiting results, setting completion values or exceptions, and tracking thread-safe coroutine submissions.
Code Like a Pro in Rust
Future is a Rust trait representing a computation that may complete later and eventually produce an output or remain pending.
- How it is used
- Uses futures to represent deferred async results and coordinate their execution on a runtime.
- How deep it goes
- Explains lazy execution and polling, then works through pinned boxed futures in trait methods.
- Examples
- Demonstrates an async timer, spawned and unexecuted blocks, a pinned observer future, and mixed synchronous and asynchronous file I/O.
- What you can do after
- Apply futures with Tokio by awaiting or spawning tasks, handling blocking work, and returning pinned futures from trait methods.
Grokking Concurrency
A future is a concurrency abstraction and placeholder representing the result of an asynchronous computation that will become available later.
- How it is used
- Uses futures to return asynchronous results and synchronize independent work with its caller.
- How deep it goes
- Builds a simple future and integrates it with cooperative socket operations and a thread pool, while noting production limitations.
- Examples
- Illustrates futures with a burger order, a cooperative socket server, and a pizza server that moves long work to a thread pool.
- What you can do after
- Builds a simple future from scratch and uses it in an illustrative asynchronous server.
Learn Rust in a Month of Lunches
A Future is a Rust abstraction representing an asynchronous computation whose result may become available later and which can be polled for readiness.
- How it is used
- Introduces futures as the return values that make asynchronous Rust computations available for polling.
- How deep it goes
- Explains output types, polling, await, runtime requirements, and multiple futures, while deferring a deep explanation of Pin.
- Examples
- Uses a function returning 8, compiler errors around await, and randomly delayed numbers joined with Tokio.
- What you can do after
- Apply futures via Tokio to await results and poll multiple asynchronous operations together.
Functional Programming in Scala, Second Edition
Future is a Java concurrency interface representing the result of an asynchronous computation and supporting result retrieval and cancellation.
- How it is used
- Represents asynchronous results and composes parallel work or non-blocking I/O through callbacks.
- How deep it goes
- Defines callback encoding, executor scheduling, parallel combination, and a blocking run bridge.
- Examples
- Uses parallel square-root mapping, callback-based byte reads, and console programs compiled into Par.
- What you can do after
- Build it from scratch as a callback-based result type and adapt asynchronous sources into composable Par actions.
Read how Functional Programming in Scala, Second Edition explains future →
Kotlin in Action, 2E
A future is an abstraction representing a result that may become available after an asynchronous computation finishes.
- How it is used
- Coordinates independent asynchronous computations whose results are awaited later.
- How deep it goes
- Defines Deferred, demonstrates async and await timing, and explains cancellation and exception-consumption responsibilities.
- Examples
- Uses concurrent delayed addition, chained login and user-data loading, cancellation, and an exception thrown beneath async.
- What you can do after
- Apply it via Kotlin async and await to run independent tasks concurrently and consume their values or failures.
Robotics for Programmers
A Python Future object represents the eventual result of an asynchronous computation.
- How it is used
- Coordinates nonblocking ROS 2 service requests with callbacks that process responses after completion.
- How deep it goes
- Explains creation, completion callbacks, and result extraction, but does not detail Future internals.
- Examples
- Uses a SetBool service client that logs the completed response from a timer-triggered request.
- What you can do after
- Operate asynchronous rclpy service clients by registering completion callbacks and extracting returned responses.
Also covered in
- Rust Web Development
- 100 Java Mistakes and How to Avoid Them
- API Design Patterns
- Server-Side WebAssembly
- Latency
- Fast Python: High performance techniques for large datasets
- Test Driven: Practical TDD and Acceptance TDD for Java Developers
What to know first
- async/awaitAsync/await is language syntax for defining asynchronous computations that can suspend at awaited operations and resume when those operations produce results.
- threadA thread is a distinct sequence of execution with its own control flow and state, managed or scheduled by a processor, runtime, or operating system.
- asynchronous programmingAsynchronous programming structures operations so that the initiating execution can continue or yield control without synchronously waiting for each operation to complete.
- concurrencyConcurrency is the structuring or execution of multiple computational activities so their progress overlaps in time, whether or not they run simultaneously.
Related concepts
- pollhas part · In Rust asynchronous programming, poll is the Future trait method that advances a future and returns whether it is pending or ready with an output.
- asyncproduced by · async is a Kotlin coroutine builder that starts an asynchronous computation and returns a Deferred representing its result.
- taskused by · A task is a discrete unit of work, activity, or computation to be performed or completed.
- asyncio.gatherimplemented by · asyncio.gather is a Python asyncio function that runs multiple awaitable objects concurrently, waits for them to complete, and collects their results.
- awaitablekind of · An awaitable is a Python object that can be used in an await expression to obtain the result of an asynchronous computation.
- threaduses · A thread is a distinct sequence of execution with its own control flow and state, managed or scheduled by a processor, runtime, or operating system.
Questions about future
What is future?
A future is an abstraction representing an asynchronous computation’s result, which may become available later and may be pending or complete.
Which Manning books explain future?
C++ Concurrency in Action, Second Edition, Rust Servers, Services, and Apps, Python Concurrency with asyncio, Code Like a Pro in Rust, Grokking Concurrency, Learn Rust in a Month of Lunches, Functional Programming in Scala, Second Edition, Kotlin in Action, 2E and 1 more.
What should I know before learning future?
Manning books that teach future usually introduce async/await, thread, asynchronous programming and concurrency first.
What is future a kind of?
Future is a kind of awaitable. An awaitable is a Python object that can be used in an await expression to obtain the result of an asynchronous computation.
What are the parts of future?
Future includes poll.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.








