Par framework API cleanup
Opened this issue · 0 comments
lars-t-hansen commented
Probably the continuation argument should always be the last argument, as that supports a natural JS style:
Par = new MasterPar(..., function () {
Par.broadcast(..., function () {
Par.invoke(..., function () {
...
}
}
}
For that to work out, Par.invoke and Par.broadcast must take the arguments to the workers as an array, not as expanded arguments - probably just as well.
Not sure how important it is. However, if we don't do this then at least move the continuation to be the first argument to the MasterPar constructor, since it is the first argument on the other APIs, including Par.eval.