Click here to Skip to main content
15,879,326 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Threadsafe Data Class Pin
Stuart Dootson23-Apr-09 7:10
professionalStuart Dootson23-Apr-09 7:10 
GeneralRe: Threadsafe Data Class Pin
softwaremonkey23-Apr-09 9:03
softwaremonkey23-Apr-09 9:03 
GeneralRe: Threadsafe Data Class Pin
led mike23-Apr-09 9:04
led mike23-Apr-09 9:04 
GeneralRe: Threadsafe Data Class Pin
Stuart Dootson23-Apr-09 9:16
professionalStuart Dootson23-Apr-09 9:16 
GeneralRe: Threadsafe Data Class Pin
led mike23-Apr-09 10:09
led mike23-Apr-09 10:09 
AnswerRe: Threadsafe Data Class Pin
Luc Pattyn23-Apr-09 9:19
sitebuilderLuc Pattyn23-Apr-09 9:19 
GeneralRe: Threadsafe Data Class Pin
softwaremonkey23-Apr-09 21:47
softwaremonkey23-Apr-09 21:47 
AnswerRe: Threadsafe Data Class Pin
Roger Stoltz23-Apr-09 22:03
Roger Stoltz23-Apr-09 22:03 
Luc's point is probably that if you want to change multiple values like a transaction, you'll need to embrace the "transaction" with a lock. Otherwise the calling the calling thread may be preempted and another thread may corrupt the "transaction".

It means that in this case it's useless to acquire a lock when entering a getter/setter method and release it when exiting.
On the other hand, if you don't have to change values like a transaction, you'll most likely do fine with the idea Stuart provided.


"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknown


GeneralRe: Threadsafe Data Class Pin
Luc Pattyn24-Apr-09 1:43
sitebuilderLuc Pattyn24-Apr-09 1:43 
Questionuse printf or cout in MFC Pin
johnjitu23-Apr-09 4:35
johnjitu23-Apr-09 4:35 
QuestionRe: use printf or cout in MFC Pin
David Crow23-Apr-09 4:45
David Crow23-Apr-09 4:45 
AnswerRe: use printf or cout in MFC Pin
johnjitu23-Apr-09 4:48
johnjitu23-Apr-09 4:48 
GeneralRe: use printf or cout in MFC Pin
johnjitu23-Apr-09 5:01
johnjitu23-Apr-09 5:01 
QuestionRe: use printf or cout in MFC Pin
David Crow23-Apr-09 5:03
David Crow23-Apr-09 5:03 
AnswerRe: use printf or cout in MFC Pin
johnjitu23-Apr-09 5:09
johnjitu23-Apr-09 5:09 
QuestionRe: use printf or cout in MFC Pin
David Crow23-Apr-09 5:10
David Crow23-Apr-09 5:10 
AnswerRe: use printf or cout in MFC Pin
johnjitu23-Apr-09 5:12
johnjitu23-Apr-09 5:12 
GeneralRe: use printf or cout in MFC Pin
Luc Pattyn23-Apr-09 5:15
sitebuilderLuc Pattyn23-Apr-09 5:15 
GeneralRe: use printf or cout in MFC Pin
johnjitu24-Apr-09 0:56
johnjitu24-Apr-09 0:56 
QuestionRe: use printf or cout in MFC Pin
David Crow23-Apr-09 5:15
David Crow23-Apr-09 5:15 
GeneralRe: use printf or cout in MFC Pin
johnjitu23-Apr-09 5:16
johnjitu23-Apr-09 5:16 
GeneralRe: use printf or cout in MFC Pin
johnjitu23-Apr-09 5:26
johnjitu23-Apr-09 5:26 
JokeRe: use printf or cout in MFC Pin
Luc Pattyn23-Apr-09 5:14
sitebuilderLuc Pattyn23-Apr-09 5:14 
AnswerRe: use printf or cout in MFC Pin
Joe Woodbury23-Apr-09 5:47
professionalJoe Woodbury23-Apr-09 5:47 
GeneralRe: use printf or cout in MFC Pin
johnjitu23-Apr-09 5:52
johnjitu23-Apr-09 5:52 

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.