MultiThreading
 All Modules Pages
Safe access to shared data

Modules

 Understanding the problem of synchronization
 
 Mutexes and locks
 
 Safe initialization of data
 
 Atomics
 

Detailed Description

When multiple threads are working on the same data there is the danger that one thread changes the data while another thread tries to read and possibly also change the data at the same time. To avoid such race conditions proper means have to be applied.

Full protection - the safe way

Protect only where really necessary

All synchronization means cause some kind of complexity and will have an impact on execution performance. Sometimes there are simpler possibilities to ensure proper multi threading.