cooperative multitasking

A scheduling style where each piece of work voluntarily gives up control after a short time so others can run, instead of being interrupted.

In more detail

If one piece of work never yields, everything else waits. The main thread is cooperative: nothing interrupts your JavaScript, so your code must yield by splitting work or using requestIdleCallback's deadline.

Related terms

Taught in

References