[8] Review request for 7186109: Simplify lock machinery for PostEventQueue & EventQueue (original) (raw)
Anthony Petrov anthony.petrov at oracle.com
Mon Aug 20 07:42:59 PDT 2012
- Previous message: [8] Review request for 7186109: Simplify lock machinery for PostEventQueue & EventQueue
- Next message: [8] Review request for 7186109: Simplify lock machinery for PostEventQueue & EventQueue
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Oleg,
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.
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/viewbug.do?bugid=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/>
- Previous message: [8] Review request for 7186109: Simplify lock machinery for PostEventQueue & EventQueue
- Next message: [8] Review request for 7186109: Simplify lock machinery for PostEventQueue & EventQueue
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]