AppContext issue in Apple Java 6 -- same issue in Oracle Java 7?

Doug Zwick Doug.Zwick at blackboard.com
Thu Jun 27 15:47:40 PDT 2013


Michael Hall wrote:

>> We are working around this by checking the ThreadGroup before queuing Runnables with SwingUtilities.invokeLater, and if the ThreadGroup of the calling thread is not the same ThreadGroup associated with our main application startup thread (which we cache at startup time),
>
> Curious is this the same one as…
> Toolkit.getDefaultToolkit().getSystemEventQueue()
>
> as per here…
> http://stackoverflow.com/questions/9873391/safe-way-to-replace-awt-eventqueue-in-running-swing-application
>
> If consistently the right one that might be easier to use than the cached startup one.

That might also eliminate the need to go through a worker thread just to get to the right event queue. Thanks for the link.

> I'm not sure theres anything else in the stack overflow you'd find useful. Although I might think that another workaround could be replace all dup EventQueue instances with ones that delegate to the one you actually want. Probably not of interest if you already have a workaround that is probably easier to implement than this.

I'd be worried about derailing anything in the other AppContexts that might depend on the operation of these other event queues, for example the console window.


This email and any attachments may contain confidential and proprietary information of Blackboard that is for the sole use of the intended recipient. If you are not the intended recipient, disclosure, copying, re-distribution or other use of any of this information is strictly prohibited. Please immediately notify the sender and delete this transmission if you received this email in error.


More information about the macosx-port-dev mailing list