Quantcast
Channel: Thread-Safe increment
Browsing all 2 articles
Browse latest View live

Thread-Safe increment

Look at InterLockedIncrement:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/interlockedincrement.aspRead this for more...

View Article



Thread-Safe increment

HiIs it thread-safe to increment a unsigned int like:static unsigned int c_unMyId = 0;unsigned int GetId() { return c_unMyId++; }or do I have to implement all the mutex stuff around it?RegardsThomas

View Article
Browsing all 2 articles
Browse latest View live




Latest Images