Click here to Skip to main content
15,880,427 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Where does VC++ save include path settings? Pin
Erudite_Eric14-Sep-11 20:21
Erudite_Eric14-Sep-11 20:21 
GeneralRe: Where does VC++ save include path settings? Pin
charlieg15-Sep-11 0:01
charlieg15-Sep-11 0:01 
AnswerRe: Where does VC++ save include path settings? Pin
bolivar12314-Sep-11 19:14
bolivar12314-Sep-11 19:14 
GeneralRe: Where does VC++ save include path settings? Pin
charlieg15-Sep-11 0:03
charlieg15-Sep-11 0:03 
QuestionDifference between Critical Sections over Mutex objects Pin
CodingLover12-Sep-11 19:13
CodingLover12-Sep-11 19:13 
AnswerRe: Difference between Critical Sections over Mutex objects PinPopular
వేంకటనారాయణ(venkatmakam)12-Sep-11 21:34
వేంకటనారాయణ(venkatmakam)12-Sep-11 21:34 
GeneralRe: Difference between Critical Sections over Mutex objects Pin
CodingLover13-Sep-11 0:13
CodingLover13-Sep-11 0:13 
AnswerRe: Difference between Critical Sections over Mutex objects Pin
ShilpiP13-Sep-11 1:05
ShilpiP13-Sep-11 1:05 
Mutex and Critical Section are used for synchronization.Both are almost same except that Critical Section is used within a same process area, where mutex is used in different process area.

I will explain you with simple example:
Suppose in your project, You are using one array and two threads are running simultaneously. First thread add data in an array and other display that data on screen.

Scenario 1: Without Critical section
There is a schedular program in OS that give time slot to every process and threads that are running. It is so frequently done that we feel that all threads are running simultaneous.Suppose time slot given to both thread is equal. If thread one is running it can add only 40 data and than time slot is given to other thread and it display 50 data. Now for some data some garbage data is displayed.
If threads uses the same resourse and we must synchronize the thread. In this case we use CS.Process area of both the thread is same, So it is fast.

Scenario 2: Suppose we use printer machine to print some data. If two person request at a time and if no synchronization process is used than it gives to garbage data. At this time one process have to wait to complete the process of second. This time the process or thread are from different process area. So we use mutexes. The process area of process is different, So it is slow.

I think this example will clear your doubt. Smile | :)
"Every Little Smile can touch Somebody's Heart...
May we find Hundreds of Reasons to Smile Everyday... and
May WE be the Reason for someone else to smile always!" (ICAN)

"Your thoughts are the architects of your destiny."

GeneralRe: Difference between Critical Sections over Mutex objects Pin
CodingLover13-Sep-11 1:22
CodingLover13-Sep-11 1:22 
GeneralRe: Difference between Critical Sections over Mutex objects Pin
ShilpiP13-Sep-11 2:17
ShilpiP13-Sep-11 2:17 
GeneralRe: Difference between Critical Sections over Mutex objects Pin
CodingLover13-Sep-11 17:39
CodingLover13-Sep-11 17:39 
GeneralRe: Difference between Critical Sections over Mutex objects Pin
ShilpiP13-Sep-11 18:39
ShilpiP13-Sep-11 18:39 
GeneralRe: Difference between Critical Sections over Mutex objects Pin
CodingLover13-Sep-11 21:21
CodingLover13-Sep-11 21:21 
QuestionProblem using IAccessible2 Pin
kartikdasani12-Sep-11 2:17
kartikdasani12-Sep-11 2:17 
Questionweb browser control difficulty Pin
doug2512-Sep-11 1:28
doug2512-Sep-11 1:28 
AnswerRe: web browser control difficulty Pin
CPallini12-Sep-11 2:16
mveCPallini12-Sep-11 2:16 
GeneralRe: web browser control difficulty Pin
doug2513-Sep-11 2:50
doug2513-Sep-11 2:50 
AnswerRe: web browser control difficulty Pin
krmed12-Sep-11 3:56
krmed12-Sep-11 3:56 
GeneralRe: web browser control difficulty Pin
doug2513-Sep-11 2:59
doug2513-Sep-11 2:59 
AnswerRe: web browser control difficulty Pin
doug2513-Sep-11 11:18
doug2513-Sep-11 11:18 
QuestionMember function pionters in C++ Pin
Erudite_Eric12-Sep-11 0:30
Erudite_Eric12-Sep-11 0:30 
AnswerRe: Member function pionters in C++ Pin
Chris Losinger12-Sep-11 1:52
professionalChris Losinger12-Sep-11 1:52 
GeneralRe: Member function pionters in C++ Pin
Erudite_Eric12-Sep-11 2:09
Erudite_Eric12-Sep-11 2:09 
GeneralRe: Member function pionters in C++ Pin
CPallini12-Sep-11 2:13
mveCPallini12-Sep-11 2:13 
GeneralRe: Member function pionters in C++ Pin
Erudite_Eric12-Sep-11 2:33
Erudite_Eric12-Sep-11 2:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.