![]() |
|
#1
|
|||
|
|||
A Question About Static Variable and Thread-SafeI was asked to write a function with a static variable in it. for example:
CPP / C++ / C Code:
Obviously this is not thread safe. Then I was asked to solve this problem to make it thread safe. I was told that I can use a class to wrap it. Does anybody has an idea what that is? Do you have a better solution? Last edited by LuciWiz : 07-Jun-2007 at 16:16.
Reason: Please insert your C/C++ code between [cpp] & [/cpp] tags
|
|||
Recent GIDBlog
Programming ebook direct download available by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The