thread-safe

Code that behaves correctly when several threads use it at the same time.

In more detail

Shared objects, such as singletons in a web server, must be thread-safe because many requests use them at once. The easiest route is to hold no mutable state; otherwise use locks or concurrent collections.

Related terms

Taught in

References