Synchronization

August 24, 2007 9:55am CST
Describe Synchronization in respect to multithreading
2 responses
• India
25 Jan 09
Synchronizing resource access between threads is a common problem when writing multithreaded applications. Having two or more threads simultaneously access the same data can lead to undesirable and unpredictable results. For example, one thread could be updating the contents of a structure while another thread is reading the contents of the same structure. It is unknown what data the reading thread will receive: the old data, the newly written data, or possibly a mixture of both. MFC provides a number of synchronization and synchronization access classes to aid in solving this problem. This topic explains the classes available and how to use them to create thread-safe classes in a typical multithreaded application.
• India
14 Sep 07
when you use the concept of threads then at several times a part of the code need to be accessed by only 1 thread at a time for doing so we need concept of synchronization.