time slicing

Splitting a long job into short slices and giving control back to the browser between them so the page stays responsive.

In more detail

It is cooperative: the running code chooses to pause, nothing forces it to. Checking the clock between small units of work decides when to yield.

Example

The React scheduler works for about five milliseconds, then yields to the browser if it has input or drawing to do.

Related terms

Taught in

References