Click here to Skip to main content
15,902,635 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalrtf help Pin
Mohammad Daba'an10-Jan-05 22:22
Mohammad Daba'an10-Jan-05 22:22 
Generalread data from line in Pin
gecool10-Jan-05 22:21
gecool10-Jan-05 22:21 
GeneralRe: read data from line in Pin
KaЯl10-Jan-05 23:20
KaЯl10-Jan-05 23:20 
Generalincrease the max length of SETWINDOWTEXT Pin
Member 147966910-Jan-05 21:43
Member 147966910-Jan-05 21:43 
GeneralRe: increase the max length of SETWINDOWTEXT Pin
Roger Allen10-Jan-05 23:19
Roger Allen10-Jan-05 23:19 
GeneralCRectTracker and scrolling problems Pin
Maverick10-Jan-05 21:38
Maverick10-Jan-05 21:38 
GeneralFIFO thread synchronizing Pin
Menny Even Danan10-Jan-05 20:53
Menny Even Danan10-Jan-05 20:53 
GeneralRe: FIFO thread synchronizing Pin
Blake Miller11-Jan-05 4:03
Blake Miller11-Jan-05 4:03 
1. Yes. This first thread to request critical section using EnterCriticalSection acquires it. The others must wait until the critical section is released with LeaveCriticalSection. I have seen some articles, posts, and other submissions here at the CodeProject site arguing that a class wrapper is a good idea in case you experience an exception - the critical section will not remain locked by a thread experiencing the exception. You can also look into TryEnterCriticalSection if you do not want your threads to block for some reason.

2. You can also use Mutex if your data is accessed by multiple threads from multiple processes. IF the data is only acessed by a single process, the critical section is generally the easiest and the quickest, without getting into interlocked element usage.

3. Not really. The critical section has been the recommended element for single-process multiple-thread protection of sections of code.

GeneralRe: FIFO thread synchronizing Pin
Menny Even Danan11-Jan-05 21:39
Menny Even Danan11-Jan-05 21:39 
GeneralRe: FIFO thread synchronizing Pin
Blake Miller12-Jan-05 5:00
Blake Miller12-Jan-05 5:00 
GeneralRe: FIFO thread synchronizing Pin
Menny Even Danan12-Jan-05 0:52
Menny Even Danan12-Jan-05 0:52 
GeneralFile Directory Table Pin
LiYS10-Jan-05 20:20
LiYS10-Jan-05 20:20 
GeneralRe: File Directory Table Pin
David Crow11-Jan-05 6:42
David Crow11-Jan-05 6:42 
GeneralRe: File Directory Table Pin
LiYS11-Jan-05 13:37
LiYS11-Jan-05 13:37 
GeneralRe: File Directory Table Pin
David Crow12-Jan-05 1:55
David Crow12-Jan-05 1:55 
GeneralCreating Property Sheet Run Time. Pin
Anonymous10-Jan-05 20:05
Anonymous10-Jan-05 20:05 
Generalsoftware package Pin
vc-programmer-10-Jan-05 19:31
vc-programmer-10-Jan-05 19:31 
GeneralRe: software package Pin
ThatsAlok11-Jan-05 0:34
ThatsAlok11-Jan-05 0:34 
GeneralConverting UNICODE to Str Pin
dSolariuM10-Jan-05 18:44
dSolariuM10-Jan-05 18:44 
QuestionI need to do some clean-up on exit, how do I break in? Pin
fklldsvs10-Jan-05 18:22
fklldsvs10-Jan-05 18:22 
AnswerRe: I need to do some clean-up on exit, how do I break in? Pin
Cedric Moonen10-Jan-05 19:50
Cedric Moonen10-Jan-05 19:50 
QuestionHow to change the Color in Scroll Bar in a TextBox? Pin
pubududilena10-Jan-05 18:04
pubududilena10-Jan-05 18:04 
QuestionHow to call javascript in mfc project without CHtmlView? Pin
Anonymous10-Jan-05 17:47
Anonymous10-Jan-05 17:47 
AnswerRe: How to call javascript in mfc project without CHtmlView? Pin
basementman11-Jan-05 5:50
basementman11-Jan-05 5:50 
GeneralSliding window in serial communications Pin
ledallam10-Jan-05 17:16
ledallam10-Jan-05 17:16 

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.