<AWT Dev> [8] Review request for 8005465: [macosx] Evaluate if checking for the -XstartOnFirstThread is still needed in awt.m
Petr Pchelko
petr.pchelko at oracle.com
Fri Dec 28 11:06:12 PST 2012
Hello.
As I understood while implementing the EmbeddedFrame, when we embed AWT into SWT, SWT did not care if AWT is OK to terminate, SWT just called dispose() for a frame and terminated without looking at AWT. This resulted in issues when AWT was still terminating but the main SWT thread was already finished. When AWT was calling something to synchronously perform selectors on the main thread deadlocks occurred. So we had to add a dispose listener to the SWT container, which spinned the main runloop until AWT frame finished disposing.
However, I may have misunderstood something.
With best regards, Petr.
28.12.2012, в 20:58, Anthony Petrov <anthony.petrov at oracle.com> написал(а):
> On 12/28/2012 20:36, Sergey Bylokhov wrote:
>>> http://cr.openjdk.java.net/~anthony/8-52-startOnFirstThreadCheck-8005465.0/
>>> 2. Introducing an AWTKeepAlive thread activated in the embedded mode only. This thread will send an event to the native event queue every 500ms as long as there are active AWT objects present. This activity will notify the embedder toolkit that the Java application as a whole is still alive and needs not exit yet.
>> Why it wasn't necessary for awt-swt bridge?
>
> I don't know. Perhaps we should ask someone who's familiar with SWT? Steve? How does SWT determine that AWT is dead and therefore it's OK to terminate the native event loop and exit on the Mac?
>
> --
> best regards,
> Anthony
More information about the awt-dev
mailing list