I'd like to do something like this:
(1 to 100).parallel(20).filter(_ > 20).foreach(sendViaHttp)
List(1,3,5,9,100).parallel(3).map(fetchFromDatabase)
This means, "take a collection, create a thread pool with N threads, and run filter etc in that thread pool". My understanding of 2.8 collections (and scala in general) is sketchy. I've fiddled with CanBuildFrom, but I'm pretty certain either what I'm doing is wrong, or is just a bad idea.
Can someone help with some examples or pointers?