mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-12 05:13:50 +08:00
EventQueue.java (invokeAndWait): Call postEvent() within synchronized block.
* java/awt/EventQueue.java (invokeAndWait): Call postEvent() within synchronized block. * java/awt/event/InvocationEvent (dispatch): Synchronize on notifier before calling notifyAll(). From-SVN: r35042
This commit is contained in:
parent
ae0e50e87b
commit
1b0bd03b7f
@ -153,11 +153,10 @@ public class EventQueue
|
||||
|
||||
InvocationEvent ie =
|
||||
new InvocationEvent(eq, runnable, current, true);
|
||||
|
||||
eq.postEvent(ie);
|
||||
|
||||
|
||||
synchronized (current)
|
||||
{
|
||||
eq.postEvent(ie);
|
||||
current.wait();
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,12 @@ public class InvocationEvent extends AWTEvent implements ActiveEvent
|
||||
runnable.run ();
|
||||
|
||||
if (notifier != null)
|
||||
notifier.notifyAll ();
|
||||
{
|
||||
synchronized (notifier)
|
||||
{
|
||||
notifier.notifyAll ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Exception getException ()
|
||||
|
Loading…
Reference in New Issue
Block a user