M
mike7411
Let's say you have an integer called progress which represents a
thread's progress (from 0 to 100 percent).
A worker thread sets this progress variable.
Another thread reads the progress variable and simply displays it.
Is there any need for the synchronized keyword in writing this code?
Thanks.
thread's progress (from 0 to 100 percent).
A worker thread sets this progress variable.
Another thread reads the progress variable and simply displays it.
Is there any need for the synchronized keyword in writing this code?
Thanks.