Fish Touching🐟🎣

Thread

Jun 18, 2023

Although we normally think of a process as having a single control flow, in modern systems a process can actually consist of multiple execution units, called threads, each running in the context of the process and sharing the same code and global data.

# Problems

# Thread Safe

thread-safe code ensures that when a thread is modifying or reading shared data, no other thread can access it in a way that changes the data

# Lightweight Thread