Answer the question
In order to leave comments, you need to log in
Is it possible to use a volatile variable for summation?
Let's say there are several threads, they add some values to a volatile variable, and output the values of this variable after real-time summation.
Is it possible to do so? What problems will arise?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question