Go backward to dist[wait] : Wait for a Task ResultGo up to 3.2 Basic Model |
dist[select]
: Wait for Some Task Resultselector := dist[select](taskList)
This calls supsends the current execution until the execution of some task in taskList has completed; it then returns a selector for this task, i.e., a list [index, result] where index denotes the position of the task in the list and result is its result.
> l := [dist[start](int, x^n, x), dist[start](int, x^n, n)]: > s := dist[select](l): > t := l[s][1]; t := 1 > r := l[s][2]; (n + 1) x r := -------- n + 1