Is there an implementation of rapid concurrent syntactical sugar in scala? eg. map-reduce
Posted
by TiansHUo
on Stack Overflow
See other posts from Stack Overflow
or by TiansHUo
Published on 2010-04-28T11:51:32Z
Indexed on
2010/04/28
13:33 UTC
Read the original article
Hit count: 294
Passing messages around with actors is great. But I would like to have even easier code.
Examples (Pseudo-code)
val splicedList:List[List[Int]]=biglist.partition(100)
val sum:Int=ActorPool.numberOfActors(5).getAllResults(splicedList,foldLeft(_+_))
where spliceIntoParts turns one big list into 100 small lists the numberofactors part, creates a pool which uses 5 actors and receives new jobs after a job is finished and getallresults uses a method on a list. all this done with messages passing in the background. where maybe getFirstResult, calculates the first result, and stops all other threads (like cracking a password)
© Stack Overflow or respective owner