Difference between revisions of "Parallel (API)"
From ComputerCraft Wiki
(Updated to API overview v2) |
(use API table template) |
||
| Line 2: | Line 2: | ||
Parallel is an API which allows you to multitask. | Parallel is an API which allows you to multitask. | ||
| − | + | {{API table|Parallel|image=Grid disk.png|2= | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | {{API table/row | |
| + | |[[parallel.waitForAny]](function1, function2, ...)|{{type|nil}} | ||
| + | |Runs all the functions at the same time, and stops when any of them returns. | ||
| + | |odd}} | ||
| − | + | {{API table/row | |
| − | + | |[[parallel.waitForAll]](function1, function2, ...)|{{type|nil}} | |
| + | |Runs all the functions at the same time, and stops when all of them have returned. | ||
| + | |}} | ||
| − | + | }} | |
| − | + | ||
| − | + | ||
| − | + | ||
[[Category:APIs]] | [[Category:APIs]] | ||
Revision as of 21:50, 14 September 2013
Parallel is an API which allows you to multitask.
|
| ||
|---|---|---|
| Function | Return values | Description |
| parallel.waitForAny(function1, function2, ...) | nil | Runs all the functions at the same time, and stops when any of them returns. |
| parallel.waitForAll(function1, function2, ...) | nil | Runs all the functions at the same time, and stops when all of them have returned. |