How Yazi Manages and Schedules Asynchronous Tasks
Updated
Yazi runs file operations as asynchronous tasks with real-time progress updates, cancellation support, and internal priority assignment. You can watch long-running work (copies, moves, deletes, downloads) advance and stop it mid-flight instead of waiting blindly or killing the terminal. This applies to operations Yazi performs itself; it is not a general-purpose job scheduler for arbitrary shell commands.
Why async task management matters in a file manager
Traditional terminal file managers block the interface while copying a large directory: no progress, no cancel, no way to keep browsing. Yazi is built on async I/O in Rust, so I/O operations run asynchronously and CPU work is spread across multiple threads to use available resources. Task management is the user-facing layer on top of that design — it turns background work into something you can see and control.
The three capabilities
Real-time progress updates
Each running task reports its progress as it advances, so you can judge whether a large transfer is moving or stalled. This is the practical difference between "the terminal seems frozen" and "this 40 GB copy is 62% done."
Task cancellation
A running task can be cancelled rather than left to finish or interrupted by closing the terminal. Useful when you started the wrong move, or a transfer to a slow drive is no longer worth waiting for.
Internal task priority assignment
Yazi assigns priorities to its internal tasks. Higher-priority work is not stuck behind bulk background operations, so the interface stays responsive while heavy jobs run.
How the pieces fit together
| Capability | What you get | When it matters |
|---|---|---|
| Async I/O | Operations don't block the UI | Browsing while a copy runs |
| Multi-threaded CPU work | Resources are used across threads | Many files, heavy previews |
| Progress updates | Live status per task | Large transfers, slow drives |
| Cancellation | Stop a task mid-run | Wrong operation, changed mind |
| Priority assignment | Important tasks aren't starved | Mixed light and heavy work |
The same async foundation powers previews: built-in code highlighting and image encoding are combined with a pre-caching mechanism to speed up image and normal file loading. So the responsiveness you notice while scrolling is the same design that keeps long operations manageable.
A concrete example
Suppose you start copying a large media directory to an external drive and then notice you grabbed the wrong folder. With Yazi's task model, the copy appears as a tracked task with progress; you cancel it instead of waiting for completion or force-closing the terminal. Meanwhile, because I/O is asynchronous and tasks carry priorities, you can keep navigating and previewing files — including images, via the built-in image protocol support — while other work continues.
Limits to keep in mind
- The evidence covers progress, cancellation, and priority for Yazi's own tasks; it does not describe a user-facing queue editor or custom priority settings, so don't assume you can reorder tasks manually.
- Image preview depends on terminal support for image protocols; the async task system and preview rendering are related but separate concerns.
- No pricing or licensing details are established here — check the project site for current terms.
For exact keybindings and task-panel behavior, consult the Yazi documentation at yazi-rs.github.io, since those interface details change between versions.