From philip.race at oracle.com Wed May 20 00:01:15 2015 From: philip.race at oracle.com (Phil Race) Date: Tue, 19 May 2015 17:01:15 -0700 Subject: com.apple.concurrent.Dispatch in the modular JDK Message-ID: <555BCECB.8060107@oracle.com> Apple's JDK 6 provided the non-standard "com.apple.concurrent.Dispatch" class which was a means for Java code to access Apple's "libdispatch". To quote the documentation at http://www.coderanch.com/how-to/javadoc/appledoc/api/com/apple/concurrent/Dispatch.html " Factory for |Executor|s and |ExecutorService|s backed by libdispatch. Access is controlled through the Dispatch.getInstance() method, because performed tasks occur on threads owned by libdispatch" The class carried over into Oracle JDK for OS X and is there all the way up to current JDk 9 dev builds. The question is what to do with this class in the 'modular JDK' where we need to decide on the 'supportedness' of many APIs and what to do with them as a result. There is one Eclipse bug from 2010 where one of the methods was added to support embedding SWT in AWT applets in the browser : https://bugs.eclipse.org/bugs/show_bug.cgi?id=303869 but that was for JDK 6 and SWT can't be embedded in the current JDK 7/8/9 Java Plugin for OS X which runs out of process .. so that usage is moot. So the current thinking is that since we do not know of anyone who uses this class that it should be unsupported in JDK 9 and not visible in the modular JDK image. So .. any comments ? -phil. From mik3hall at gmail.com Wed May 20 00:28:15 2015 From: mik3hall at gmail.com (Michael Hall) Date: Tue, 19 May 2015 19:28:15 -0500 Subject: com.apple.concurrent.Dispatch in the modular JDK In-Reply-To: <555BCECB.8060107@oracle.com> References: <555BCECB.8060107@oracle.com> Message-ID: <6E073FB3-DEE7-4D49-89BF-D08CE8BA7F2F@gmail.com> > On May 19, 2015, at 7:01 PM, Phil Race wrote: > > Apple's JDK 6 provided the non-standard "com.apple.concurrent.Dispatch" class > which was a means for Java code to access Apple's "libdispatch". > To quote the documentation at > http://www.coderanch.com/how-to/javadoc/appledoc/api/com/apple/concurrent/Dispatch.html Is this the only list you?re raising the issue on? Given this project is inactive you might find more current OS X developers on other lists. There are 173k hits on google for? com.apple.concurrent.Dispatch Most of the first hits do seem to be SWT. Isn?t there some place you can leave the source for the Mac specific stuff you decide to phase out just in case someone decides to yell later? Some repository somewhere maybe. Me? Don?t remember ever hearing of it and it won?t matter at all. Michael Hall From Kustaa.Nyholm at planmeca.com Wed May 20 02:38:34 2015 From: Kustaa.Nyholm at planmeca.com (Kustaa Nyholm) Date: Wed, 20 May 2015 05:38:34 +0300 Subject: com.apple.concurrent.Dispatch in the modular JDK In-Reply-To: <6E073FB3-DEE7-4D49-89BF-D08CE8BA7F2F@gmail.com> Message-ID: On 20/05/2015 03:28, "Michael Hall" wrote: >Me? Don?t remember ever hearing of it and it won?t matter at all. > > Likewise here. This e-mail may contain confidential or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. We will not be liable for direct, indirect, special or consequential damages arising from alteration of the contents of this message by a third party or as a result of any virus being passed on or as of transmission of this e-mail in general. From lordpixel at me.com Wed May 20 04:28:41 2015 From: lordpixel at me.com (Andrew Thompson) Date: Wed, 20 May 2015 00:28:41 -0400 Subject: com.apple.concurrent.Dispatch in the modular JDK In-Reply-To: <555BCECB.8060107@oracle.com> References: <555BCECB.8060107@oracle.com> Message-ID: <94162343-0C45-4293-AB5E-6D15C5206909@me.com> A few years ago I had a brief email exchange with Doug Lea I the idea of providing an SPI so platforms could plug in implementations for a "default" ExecutorService. The idea was this could be a regular fixed thread pool or something more exotic like libdispatch, which is, after all OS managed and supposedly plays nicely with power management etc. I didn't take the idea any further, but something similar cropped up when lamdas were added in Java 8, the idea of a default mechanism for parallel lambda execution. I still think there's a good idea in there. The notion of a default thread pool that could be backed by more native code on various platforms. But that whole infrastructure would need to be created. It's more like a JEP. If that were to exist then the Dispatch class would be a natural way to implement on OS X. Andrew > On May 19, 2015, at 8:01 PM, Phil Race wrote: > > Apple's JDK 6 provided the non-standard "com.apple.concurrent.Dispatch" class > which was a means for Java code to access Apple's "libdispatch". > To quote the documentation at > http://www.coderanch.com/how-to/javadoc/appledoc/api/com/apple/concurrent/Dispatch.html > > " Factory for |Executor|s and |ExecutorService|s backed by libdispatch. > Access is controlled through the Dispatch.getInstance() method, > because performed tasks occur on threads owned by libdispatch" > > The class carried over into Oracle JDK for OS X and is there all the way up > to current JDk 9 dev builds. > > The question is what to do with this class in the 'modular JDK' where > we need to decide on the 'supportedness' of many APIs and what > to do with them as a result. > > There is one Eclipse bug from 2010 where one of the methods was > added to support embedding SWT in AWT applets in the browser : > https://bugs.eclipse.org/bugs/show_bug.cgi?id=303869 > > but that was for JDK 6 and SWT can't be embedded in the current JDK 7/8/9 > Java Plugin for OS X which runs out of process .. so that usage is moot. > > So the current thinking is that since we do not know of anyone who > uses this class that it should be unsupported in JDK 9 and not > visible in the modular JDK image. > > So .. any comments ? > > -phil. > > > > >