Tagged Questions
3
votes
2answers
56 views
Is this a scenario to use volatile instead of synchronized?
I want to know if using volatile in this scenario will give a better performance than using synchronization. Specifically for the paused and running instance variable in the SimulationManager class.
...
4
votes
2answers
884 views
thread-safe stl map accessor
So after learning that stl map containers are not inherently atomic and therefore not thread-safe (check out this related stackoverflow question and usage example), I decided to create code that would ...
2
votes
1answer
231 views
What do you think about resource locker in Qt?
The idea is to lock resource, in c# or java way un Qt with code
lock(obj){/*process with locked obj*/}
No I see, the problem with deleting obj under lock.
resourcelocker.h
#ifndef RESOURCELOCKER_H
...