On Sunday 08 April 2007 00:46:04 Michael Hall wrote:
What you could do is have the launcher run off of it's own thread
that just idles but includes the event handler.
No, I tried that. It makes SWT unhappy. I think the events expect
to have the
primary thread, and SWT expects to have it too, and so you can
either have
events and no UI, or the UI and no events.
My guess there might be that the OS X events are set up to be
delivered on the main thread. There is no reason, assuming you can
receive them at all, that you couldn't immediately pass their
processing off to another thread once you have them. You aren't
required to stay on the main thread.
It seems then there might be a solution to the threading problem
after all? Without looking I'm not sure what it would be either.
Maybe someone else on the list might still have suggestions there.
I've spent a bit of time on #azureus-hackers and looking through
the Azureus
source code. There seems to be some real black magic going on
there. It's
using a combination of JNI and swt.internal.carbon hooks into the
OS to do
it.
If they are throwing Carbon into the mix then they also get
additional points for a even greater degree of difficulty.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden