(.. Runtime getRuntime availableProcessors) is a bit cleaner
On Sat, Apr 12, 2014 at 4:18 PM, Cecil Westerhof <cldwester...@gmail.com>wrote: > 2014-04-12 16:51 GMT+02:00 Patrick Kristiansen <patr...@patrkris.dk>: > >> http://stackoverflow.com/questions/4759570/finding-number-of-cores-in-java >> > > Thanks. I use now: > (. (. Runtime (getRuntime)) availableProcessors) > > > >> On Saturday, April 12, 2014 4:43:56 PM UTC+2, Cecil Westerhof wrote: >>> >>> I am experimenting with concurrent programming. Is it possible to >>> determine how many cores there are on a system? Because it is in the case I >>> am working on at the moment not profitable to use more threads as there are >>> cores. (That slows the program down.) Can I find out the number of cores of >>> the system where the program is running. Preferable system independent. >>> >>> Is there also a possibility to get the load of a system? When the load >>> is low, I could start more threads as when the load is high. >>> >> > -- > Cecil Westerhof > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Fergal Byrne, Brenter IT Author, Real Machine Intelligence with Clortex and NuPIC https://leanpub.com/realsmartmachines <http://www.examsupport.ie>http://inbits.com - Better Living through Thoughtful Technology http://ie.linkedin.com/in/fergbyrne/ https://github.com/fergalbyrne e:fergalbyrnedub...@gmail.com t:+353 83 4214179 Formerly of Adnet edi...@adnet.ie http://www.adnet.ie -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.