Monday, March 04, 2013

adambom/parallel.js · GitHub

adambom/parallel.js · GitHub: "spawn takes a function and a list of arguments and spawns a worker thread for computing the result of your function. spawn takes two arguments, a function, and args, which may be any value that can be handled by JSON.stringify. Numbers, booleans, and objects/arrays should work. spawn will return a RemoteReference, which is essentially to a pointer to the result of your function, but on a different processor. To get the result of the computation, you can call fetch on the remote reference."

'via Blog this'