preemption

Interrupting work in progress so something more urgent can run first.

In more detail

The interrupted work is resumed or redone later. Operating systems preempt processes; libraries can preempt their own work.

Example

When a keystroke arrives during a slow transition render, React pauses the background work, commits the urgent update, then restarts the transition with the latest state.

Related terms

Taught in

References