3 ms·
In C++ you could also make an object (per thread?) and use member vars instead of static vars. Also, if you're going to use static vars in multithreaded contex
by repsilat 8y ago
In C++ you could also make an object (per thread?) and use member vars instead of static vars.
Also, if you're going to use static vars in multithreaded contexts doing this, better to write
thing = 5;
(via that macro magic) than `thing++`. Then at least nothing too bad should happen...