critical section

The part of a program that reads and writes shared state and must therefore be run by only one thread at a time.

In more detail

Keep critical sections as small as possible so other threads are not kept waiting. Holding a lock while calling a slow service is a common cause of poor throughput.

Related terms

Taught in

References