Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Mac, enhancements to applets and what it means for -XstartOnFirstThread

Sorry for the delay on replying -- this mailing list is buried deep in my mailbox list.

On Oct 27, 2010, at 1:42 PM, Christopher Deckers wrote:

> Extrapolations on this applet bug fix:
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=303869#c9
> 
> Correct my if I am wrong, but does it mean I can create a Display
> using the executor in a normal application? No more
> -XstartOnFirstThread needed?
> I tried it on my SWT_AWT framework and it seems to work.

If you are able to use com.apple.concurrent.Dispatch.getInstance().getNonBlockingMainQueueExecutor(), then, yes, there's no need to use -XstartOnFirstThread, as it's basically accomplishing the same thing in Java code that the current 'java' executable does if you pass in that argument.

> I also initially forgot to call readAndDispatch/sleep, which I then
> added wrapped in an executor call. Would that cause any harm if one
> were to omit it?

There is a runloop observer that will allow async exec calls to work, but readAndDispatch also does additional work that does not happen in the observer (deferred layouts, graphics context flushing, popups, etc.) so I would not leave it out.

-- Scott K.

------------------
Scott Kovatch
IBM
Eclipse Platform Team
Pleasanton, CA





Back to the top