[concurrency-interest] Simple ScheduledFuture problem
Dhanji R. Prasanna
dhanji at gmail.com
Tue Sep 5 06:42:23 EDT 2006
Thanks Brian and guys for the wise words. =)
On 9/5/06, Brian Goetz <brian at quiotix.com> wrote:
> > yes, but presumably a more elegant solution is for the other "setting
> > methods" to invoke the single setter, and treat the volatile field as
> > a javabeans property.
> No, that wouldn't work. Otherwise, two threads racing to increment
> could result in a lost update. Volatile is tricky!
More information about the Concurrency-interest