Is it safe to have multiple threads add to or subtract from a quantity?
Say I have a single floating point number called result equal to 0 and two threads, one thread adds 4 and the other subtracts 2. Is there any possibility that result will be equal something other then 2 afterwards? If you want a more concrete example I ask this question because of a project I'm...
__________________
Website Development
Domain Name Forum
|