JDK-7186109 : Simplify lock machinery for PostEventQueue & EventQueue
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 8
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-07-23
  • Updated: 2013-04-16
  • Resolved: 2012-09-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8 b58Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
In order to optimize and clarify lock sequence in EventQueue & PostEventQueue the following steps should be done:
1. Remove flushLock from SunToolkit.flushPendingEvent()
1a. Try to remove SunToolkitSubclass (if possible)
2. Return method PostEventQueue.flush() as 'synchronized' back
3. Add call of SunToolkit.flushPendingEvents() to EventQueue.detachDispatchThread(),
right before pushPopLock.lock()
4. Remove !SunToolkit.isPostEventQueueEmpty() check from EventQueue.detachDispatchThread()
5. Remove SunToolkit.isPostEventQueueEmpty() & PostEventQueue.noEvents();

Run tests mentioned in CR 4648733

Comments
SUGGESTED FIX http://cr.openjdk.java.net/~bagiras/8/7186109.5/
13-09-2012

EVALUATION Please see details in description
17-08-2012