Click here to Skip to main content
16,005,552 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: static variable Pin
ghle24-Aug-07 15:28
ghle24-Aug-07 15:28 
AnswerRe: static variable Pin
ghle25-Aug-07 4:04
ghle25-Aug-07 4:04 
GeneralRe: static variable Pin
George_George25-Aug-07 22:08
George_George25-Aug-07 22:08 
AnswerRe: static variable Pin
BadKarma23-Aug-07 22:10
BadKarma23-Aug-07 22:10 
GeneralRe: static variable Pin
George_George23-Aug-07 22:36
George_George23-Aug-07 22:36 
GeneralRe: static variable Pin
BadKarma23-Aug-07 23:24
BadKarma23-Aug-07 23:24 
GeneralRe: static variable Pin
George_George23-Aug-07 23:39
George_George23-Aug-07 23:39 
GeneralRe: static variable Pin
toxcct24-Aug-07 1:42
toxcct24-Aug-07 1:42 
do you know what thread safe means ?
can't you search the web before asking dumb questions like you know doing very well, and weighting the forum for nothing ?

returning the address of a local static variable isn't thread safe simply means that if a thread is calling the function (so, potentially being modifying the variable value), but another thread is modifying the variable at the same time, using the direct access through its address, you cannot ensure of the final value of the variable...
when both threads write at the same place at the same time, the one which wrote the memory at last wins the game...

ps: so i see you keep playing with the voting system... be very careful when voting my posts. they can just explode on you face, but then don't ever wonder why :p


GeneralRe: static variable Pin
George_George25-Aug-07 21:25
George_George25-Aug-07 21:25 
GeneralRe: static variable Pin
codeII24-Aug-07 1:49
codeII24-Aug-07 1:49 
GeneralRe: static variable Pin
George_George25-Aug-07 21:27
George_George25-Aug-07 21:27 
AnswerRe: static variable Pin
David Crow24-Aug-07 6:05
David Crow24-Aug-07 6:05 
GeneralRe: static variable Pin
George_George25-Aug-07 21:29
George_George25-Aug-07 21:29 
AnswerRe: static variable Pin
ghle26-Aug-07 3:42
ghle26-Aug-07 3:42 
GeneralRe: static variable Pin
George_George26-Aug-07 6:42
George_George26-Aug-07 6:42 
GeneralRe: static variable [modified] Pin
ghle26-Aug-07 10:00
ghle26-Aug-07 10:00 
GeneralRe: static variable Pin
George_George26-Aug-07 19:22
George_George26-Aug-07 19:22 
Questionregistry cleaner for window xp Pin
niki dutta23-Aug-07 18:26
niki dutta23-Aug-07 18:26 
AnswerRe: registry cleaner for window xp Pin
User 58385223-Aug-07 19:18
User 58385223-Aug-07 19:18 
AnswerRe: registry cleaner for window xp Pin
_AnsHUMAN_ 23-Aug-07 20:04
_AnsHUMAN_ 23-Aug-07 20:04 
AnswerRe: registry cleaner for window xp Pin
ThatsAlok23-Aug-07 20:11
ThatsAlok23-Aug-07 20:11 
AnswerPlease continue on the same thread !! Pin
toxcct23-Aug-07 21:57
toxcct23-Aug-07 21:57 
AnswerRe: registry cleaner for window xp Pin
Hamid_RT24-Aug-07 2:51
Hamid_RT24-Aug-07 2:51 
AnswerRe: registry cleaner for window xp Pin
David Crow24-Aug-07 6:18
David Crow24-Aug-07 6:18 
QuestionMFC Dialog I/O Pin
alberthyc23-Aug-07 17:53
alberthyc23-Aug-07 17:53 

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.