On 8/30/13 7:04 PM, Jason Mehrens wrote:
The coarse grain locking in FileHandler, MemoryHandler, SocketHandler,
and StreamHandler publish could/should be relaxed so we are not calling
isLoggable while holding the lock.

Hi Jason,

I'm not sure I'd want to attempt that. Modifications in logging code
have a tendency to come back and bite you ;-(...

isLoggable() is not synchronized and no longer calls synchronized
methods since we're now using volatiles.

So it can now be called by Thread A even if Thread B has locked
the handler.

Or did I miss something?

best regards,

-- daniel



Jason

 > Date: Fri, 30 Aug 2013 13:50:56 +0200
 > From: daniel.fu...@oracle.com
 > To: david.hol...@oracle.com
 > Subject: Re: RFR: JDK-6823527: java.util.logging.Handler has thread
safety issues
 > CC: core-libs-dev@openjdk.java.net
 >
 > Hi,
 >
 > Please find below an updated patch for solution (c)
 >
 > <http://cr.openjdk.java.net/~dfuchs/webrev_6823527/webrev.02/>
 >
 > best regards,
 >
 > -- daniel
 >

Reply via email to