[concurrency-interest] Simple ScheduledFuture problem

Dhanji R. Prasanna dhanji at gmail.com
Tue Aug 22 20:09:41 EDT 2006


so the volatile field cant be read when a thread is in its synchronized setter?

On 8/23/06, David Holmes <dcholmes at optusnet.com.au> wrote:
> > Dhanji R. Prasanna writes:
> > Im curious, what is the purpose of declaring flag volatile AND
> > synchronizing setter access to it?
>
> It gives you a simple/crude read/write lock.
>
> David Holmes
>


More information about the Concurrency-interest mailing list