warming up your workspace

Thread

Applies to: general

A thread is an independent flow of execution within a process, sharing the process's memory with other threads. Threads enable concurrency, but because they share memory, access to shared data must be synchronized to avoid races.

process (own memory)
  +- thread 1   shared heap
  +- thread 2   shared heap

See also: concurrency, mutex