Task
A task is a discrete unit of work, activity, or computation to be performed or completed.
Python Concurrency with asyncio
An asyncio task is a future-like unit of work that runs a coroutine and eventually contains its result or exception.
- How it is used
- Runs multiple long-running, primarily I/O-bound coroutines concurrently on one asyncio event loop.
- How deep it goes
- Explains scheduling, awaiting, cancellation, timeouts, exceptions, futures, and implementation steps, but defers advanced custom awaitable construction.
- Examples
- Uses delayed coroutines, status messages during waits, an asyncio echo server, slow web requests, and a custom task runner.
- What you can do after
- Build it from scratch with asyncio.create_task, await results, cancel slow work, and diagnose unobserved task exceptions.
Rust Servers, Services, and Apps
An asynchronous task is a schedulable unit of asynchronous computation managed by an asynchronous runtime.
- How it is used
- Handles concurrent HTTP requests by assigning each request a task scheduled by an async runtime.
- How deep it goes
- Explains spawning, joining, and future polling through code, while deferring a full explanation of Pin.
- Examples
- Uses two simulated file reads and a custom timer to show concurrent scheduling and wake-up.
- What you can do after
- Apply it via Tokio by spawning tasks, awaiting async functions, and joining their handles.
F# in Action: A Revised Edition of Get Programming with F#
Task<'T> is a generic .NET task type representing an asynchronous operation that eventually produces a value of type T.
- How it is used
- Represents asynchronous work, particularly I/O at application boundaries where waiting should not block a local thread.
- How deep it goes
- Explains generic results, completion status, awaiting, parallel composition, and differences from Async without descending into Task implementation internals.
- Examples
- Uses asynchronous file reads, a delayed Task, missing-file status checks, and parallel reads of three files.
- What you can do after
- Apply it via F# task { } and Task.WhenAll to await and combine asynchronous .NET operations.
Read how F# in Action: A Revised Edition of Get Programming with F# explains task →
Secrets of the JavaScript Ninja, Second Edition
A unit of scheduled work processed by a runtime's event loop, such as an event handler or timer callback.
- How it is used
- Explains why clicks and timer callbacks wait when browser JavaScript is already executing.
- How deep it goes
- Works through millisecond-by-millisecond queue scenarios and distinguishes task categories without detailing event-loop implementation internals.
- Examples
- Uses two queued button clicks and a combined click, timeout, and interval timing scenario.
- What you can do after
- Diagnose/debug with it when handlers start late, and use timers to break expensive work into manageable chunks.
Read how Secrets of the JavaScript Ninja, Second Edition explains task →
.NET in Action, Second Edition
Task is a .NET type representing an asynchronous unit of work that may complete in the future.
- How it is used
- Uses Tasks to avoid sequential waiting during a comic search that makes HTTP calls.
- How deep it goes
- Works through async methods, awaited I/O, cancellation tokens, and task coordination; does not develop thread internals.
- Examples
- Shows an asynchronous comic fetch, a title search using multiple tasks, and a caller that awaits the result.
- What you can do after
- Apply it via the .NET Task Parallel Library to make cancellable asynchronous HTTP calls.
Grokking Concurrency
A task is a logically independent chunk of work that serves as a general abstraction for a unit of execution.
- How it is used
- Organizes application work into independent units for serial execution, concurrency, and mapping onto available processing resources.
- How deep it goes
- Defines tasks and contrasts serial, concurrent, and parallel execution, but defers detailed implementation to threads, processes, and runtime systems.
- Examples
- Uses recipe steps, laundry loads, file writing, image rotation, and screen printing to illustrate task boundaries and dependencies.
- What you can do after
- Apply it by decomposing a problem into independent work units and checking their dependencies before choosing serial or concurrent execution.
Get Programming: Learn to code with Python
A task is a unit of work performed through a sequence of actions or steps to achieve a goal.
- How it is used
- Uses task decomposition to make programs easier to debug and to structure a document-similarity project.
- How deep it goes
- Defines dependencies and independence, then stops before choosing implementations for the capstone tasks.
- Examples
- Uses online ordering and document similarity, including reading files, counting words, and calculating similarity.
- What you can do after
- Apply it by dividing problems into reusable tasks before selecting implementations.
Read how Get Programming: Learn to code with Python explains task →
Data Storytelling with Altair and AI
A task is a prompt component that specifies the operation or result the generative AI system should perform or produce.
- How it is used
- Uses a task to specify the operation or result required from ChatGPT in data storytelling and textual context generation.
- How deep it goes
- Defines tasks, lists common forms, demonstrates title generation, and explains iterative refinement without detailing model internals.
- Examples
- Uses title generation from a fragility passage and chart annotations or commentaries as concrete task examples.
- What you can do after
- Apply task instructions to generate titles, summaries, translations, ideas, annotations, and commentaries, then refine prompts iteratively.
Read how Data Storytelling with Altair and AI explains task →
Pro ASP.NET Core 7, Tenth Edition
Task is the .NET abstraction representing an asynchronous operation that may produce a result when it completes.
- How it is used
- Uses tasks to represent asynchronous HTTP operations and ASP.NET Core action results.
- How deep it goes
- Explains typed results, continuations, and async/await, but leaves deeper asynchronous and parallel-programming details for further study.
- Examples
- Demonstrates fetching a web page's content length and awaiting that result in a controller action.
- What you can do after
- Apply it via async/await to write HTTP helper methods and controller actions that return typed tasks.
Modern C, Third Edition
A task is a distinct part of a program's work that can be performed with little or no interaction with other tasks.
- How it is used
- Organizes concurrent program work into responsibilities that can execute with little interaction.
- How deep it goes
- Defines task boundaries and illustrates their thread-based execution, but defers detailed synchronization mechanisms.
- Examples
- Uses the B9 cellular-game tasks for drawing, input, updating, and neighbor accounting.
- What you can do after
- Evaluate program responsibilities as candidate concurrent tasks and relate each task to a thread control flow.
Rust in Action: Systems programming concepts and techniques
A task is an abstract unit of work whose meaning may range from a thread to a function call or a running program.
- How it is used
- Frames concurrency models by treating processes, threads, function calls, and running programs as different views of work.
- How deep it goes
- Defines the term across abstraction levels and relates it to isolation, but stops short of implementation details.
- Examples
- Uses process threads, function calls, running programs, blocked console output, and virtual machines as concrete cases.
- What you can do after
- Evaluate task models by comparing their meanings, isolation properties, interference risks, and runtime overhead.
Read how Rust in Action: Systems programming concepts and techniques explains task →
Effective Behavior-Driven Development
A work unit representing work required to complete a user story, often recording a team's design or implementation decisions.
- How it is used
- Breaks stories into team-owned work units that capture design decisions and track daily progress.
- How deep it goes
- Defines task ownership and technical character, then explains scenario alignment, benefits, and exceptions.
- Examples
- Contrasts a delivery-address table task with a generic table task and compares partially completed story outcomes.
- What you can do after
- Apply scenarios to organize technical work around expected behavior and enable earlier feedback.
Read how Effective Behavior-Driven Development explains task →
Also covered in
- C# Concurrency: Asynchronous and multithreaded programming
- Build and Orchestrator in Go (From Scratch)
- Build Python Web Apps with Streamlit
- Grokking AI Applications
- Algorithms Every Programmer Should KnowIn early access (MEAP)
- Learn Concurrent Programming with Go
- Amazon Web Services in Action, Third Edition: An in-depth guide to AWS
- AI Agents in Action
- Grokking GPU ProgrammingIn early access (MEAP)
- Modern C
- Designing Deep Learning Systems: A guide for software engineers
- Building Web APIs with ASP.NET Core
What to know first
- 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.
- async/awaitAsync/await is language syntax for defining asynchronous computations that can suspend at awaited operations and resume when those operations produce results.
- CPUA central processing unit (CPU) is a computer processor that executes program instructions and performs general-purpose computational operations.
- multithreadingMultithreading is the execution of multiple threads of control within a program, concurrently through interleaving or simultaneously.
Related concepts
- futureuses · A future is an abstraction representing an asynchronous computation’s result, which may become available later and may be pending or complete.
- async/awaituses · Async/await is language syntax for defining asynchronous computations that can suspend at awaited operations and resume when those operations produce results.
- asyncio.create_taskproduced by · asyncio.create_task is a Python asyncio function that schedules a coroutine to run as a Task on an event loop and returns that Task.
- asyncio.gatherused by · asyncio.gather is a Python asyncio function that runs multiple awaitable objects concurrently, waits for them to complete, and collects their results.
- coroutineuses · A coroutine is a computation that can suspend and later resume execution while retaining its state, enabling cooperative transfer of control.
- InvokeAsyncproduced by · InvokeAsync is an API method for invoking an operation asynchronously and obtaining or scheduling its result.
Questions about task
What is task?
A task is a discrete unit of work, activity, or computation to be performed or completed.
Which Manning books explain task?
Python Concurrency with asyncio, Rust Servers, Services, and Apps, F# in Action: A Revised Edition of Get Programming with F#, Secrets of the JavaScript Ninja, Second Edition, .NET in Action, Second Edition, Grokking Concurrency, Get Programming: Learn to code with Python, Data Storytelling with Altair and AI and 4 more.
What should I know before learning task?
Manning books that teach task usually introduce thread, async/await, CPU and multithreading first.
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.











