Difference between revisions of "Parallel (API)"
From ComputerCraft Wiki
m |
|||
| Line 4: | Line 4: | ||
!style="background:#EEE" width="*"|Description | !style="background:#EEE" width="*"|Description | ||
|- | |- | ||
| − | |[[parallel.waitForAny]]( function1, function2, | + | |[[parallel.waitForAny]](function1, function2, ...) |
|Runs all the functions at the same time, and stops when any of them returns. | |Runs all the functions at the same time, and stops when any of them returns. | ||
|- | |- | ||
| − | |[[parallel.waitForAll]]( function1, function2, | + | |[[parallel.waitForAll]](function1, function2, ...) |
|Runs all the functions at the same time, and stops when all of them have returned. | |Runs all the functions at the same time, and stops when all of them have returned. | ||
|} | |} | ||
[[Category:APIs]] | [[Category:APIs]] | ||
Revision as of 08:35, 25 November 2012
Parallel is an API which allows you to multitask.
| Method name | Description |
|---|---|
| parallel.waitForAny(function1, function2, ...) | Runs all the functions at the same time, and stops when any of them returns. |
| parallel.waitForAll(function1, function2, ...) | Runs all the functions at the same time, and stops when all of them have returned. |