Wouldn't this be simpler with pmap, e.g. http://gist.github.com/399269
although to be honest I don't really know how the automatically
parallelized clojure functions decide how many threads to use. Is the
JVM smart enough to only create as many system-level threads as make
sense on my hardware?
Yes but AFAIK you only get availableProcessors + 2 threads with pmap
which is fine when the task is CPU bound but for downloading web pages
most of the time will be lost at waiting for I/O so having more
threads would speed things up.
Regards...
--
Nurullah Akkaya
http://nakkaya.com
On Thu,
Hi Nurullah,
Nurullah Akkaya nurul...@nakkaya.com writes:
Yes but AFAIK you only get availableProcessors + 2 threads with pmap
That's good to know, is this documented somewhere?
which is fine when the task is CPU bound but for downloading web pages
most of the time will be lost at waiting
Hallo all,
A friend of mine ask if there is a smart way to get the html code of
couple thousand links but with a script, it takes for ever since it
always has takes a couple of seconds to get the connection.
I needs to be multi threaded so we can use all of the download rate.
So I sad I could