<AWT Dev> [8] Review request for 7186109: Simplify lock machinery for PostEventQueue & EventQueue
Anthony Petrov
anthony.petrov at oracle.com
Mon Aug 20 07:42:59 PDT 2012
Hi Oleg,
1. src/share/classes/java/awt/EventQueue.java
The comment block is about the lock()/unlock() synchronized block, so I
suggest to move a call to flushPendingEvents() above the comment for
clarity.
2. src/share/classes/sun/awt/SunToolkit.java
2a) We must synchronize access to the isFlushingPendingEvents flag.
2b) A comment at line 2110 is no longer relevant/accurate, I guess. BTW,
how do we avoid the mentioned deadlock now?
--
best regards,
Anthony
On 08/17/12 16:49, Oleg Pekhovskiy wrote:
> Hi!
>
> Please review the fix for CR:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7186109
>
> Webrev:
> http://cr.openjdk.java.net/~bagiras/8/7186109.1/
>
> The following changes were made:
> 1. Removed flushLock from SunToolkit.flushPendingEvent()
> 2. Returned method PostEventQueue.flush() as 'synchronized' back
> 3. Added call of SunToolkit.flushPendingEvents() to
> EventQueue.detachDispatchThread(),
> right before pushPopLock.lock()
> 4. Removed !SunToolkit.isPostEventQueueEmpty() check from
> EventQueue.detachDispatchThread()
> 5. Removed SunToolkit.isPostEventQueueEmpty() & PostEventQueue.noEvents();
>
> Thanks,
> Oleg
> <http://cr.openjdk.java.net/%7Ebagiras/8/7186109.1/>
More information about the awt-dev
mailing list