Removal of two instances of synchronization on Boolean
omajid at redhat.com
Thu May 17 12:48:01 PDT 2012
On 05/17/2012 03:38 PM, Adam Domurad wrote:
> Hello all. Tiny patch here to remove two instances of synchronization on
> Boolean (considered bad practice as typically only two Boolean objects
> While I was not entirely sure what should be done about the Boolean
> synchronization, Deepak's opinion was that the synchronization was not
> needed, so I submitted this small patch.
I could be wrong, but seems to me that read() and write() are running in
different threads. Without some form of synchronization, writes from one
thread may not be visible to the other thread at all. Making
shuttingDown a 'volatile boolean' should be sufficient.
More information about the distro-pkg-dev