<AWT Dev> [8] Review request for 8005465: [macosx] Evaluate if checking for the -XstartOnFirstThread is still needed in awt.m
Sergey Bylokhov
Sergey.Bylokhov at oracle.com
Thu Jan 10 06:13:55 PST 2013
10.01.2013 17:55, Anthony Petrov wrote:
> Thanks Petr. I think we don't want to do the same in FX because we
> don't even want to call any AWT APIs from there in the first place.
> Instead, my current solution offers a way to terminate both toolkits
> graciously.
As far as I understand from the discussion SWT doesn't survive
situation, when we open 2 window(SWT and AWT) and close SWT window
first. Since in this case SWT stops appkit run loop. This fix works in
this case and this means that we should apply the same patch to SWT.
Petr, can you clarify this? Thanks
>
> Sergey, does this resolve your concern?
>
> --
> best regards,
> Anthony
>
> On 12/28/12 23:06, Petr Pchelko wrote:
>> 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
>>
--
Best regards, Sergey.
More information about the awt-dev
mailing list