Tag Archives: Synchronization

Thread Synchronization : Using Critical Section

Download source code for this project from here Using Critical Section Software development is a team effort. Unless team members cooperate with one another, synchronize their work with the rest of the team, the team can’t go far. Similarly if … Continue reading

Posted in MFC, Tutorial | Tagged , , | Leave a comment

What is Multithreading?

Posted in Uncategorized, VC++ | Tagged , | Leave a comment

Multi-Threading in Windows

there are two ways to program with multiple threads: use the Microsoft Foundation Class (MFC) library or the C run-time library and the Win32 API. What is threading ? A thread is basically a path of execution through a program. … Continue reading

Posted in Uncategorized, VC++ | Tagged , | 4 Comments

Threading Questions and Answers

37) What is the difference between process and thread? Ans: Process is a program in execution whereas thread is a separate path of execution in a program. 38) What is multithreading and what are the methods for inter-thread communication and … Continue reading

Posted in Uncategorized, VC++ | Tagged , | Leave a comment

Multithreading and Synchronization in Win32 applications

Synchronization – Overview The concurrent execution of threads and processes in Win32 is achieved by synchronization mechanisms. Following methods/objects are used to achieve synchronization Critical Section – single process; – non kernel object Mutexes Mutually Exclusive Critical Section + Multi … Continue reading

Posted in Uncategorized, VC++ | Tagged , | Leave a comment

What is a Message Loop ?

while(GetMessage(&Msg, NULL, 0, 0) > 0) { TranslateMessage(&Msg); DispatchMessage(&Msg); } 1. The message loop calls GetMessage(), which looks in your message queue. If the message queue is empty your program basically stops and waits for one (it Blocks). 2. When … Continue reading

Posted in Uncategorized, VC++ | Tagged , | Leave a comment