Quantcast
Channel: Recent posts
Viewing all articles
Browse latest Browse all 20

Is Thread Checker telling the truth?

$
0
0
Inglese

Hi,


I have a function that's called a lot from within some muiltthreaded code that looks roughly like this (hopefully not too mangled by the web form to read!):


Thing* get_thing()


{


lock();


if (g_references == 0)


g_thing = new Thing();


g_references++;


unlock();


return g_thing;
}


Viewing all articles
Browse latest Browse all 20

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>