Difference between revisions of "Parallel (API)"
From ComputerCraft Wiki
m |
(Updated to API overview v2) |
||
| Line 1: | Line 1: | ||
| + | |||
Parallel is an API which allows you to multitask. | Parallel is an API which allows you to multitask. | ||
| − | + | ||
| − | + | <table style="width: 100%; border: solid 1px black; margin: 2px; border-spacing: 0px;"> | |
| − | + | <tr><td colspan="2" style="font-weight: bold; font-size: large; padding-bottom: .3em; border-bottom: solid #C9C9C9 1px; background: #D3FFC2; line-height:28px;"> | |
| − | + | [[File:Grid_disk.png|24px]] | |
| − | + | Parallel (API) | |
| − | + | </td></tr> | |
| − | + | ||
| − | + | <tr><td style="width: 350px; background: #E0E0E0; padding: .4em; font-weight:bold;">Method Name</td><td style="background: #E0E0E0; padding: .4em; font-weight:bold;">Description</td></tr> | |
| − | + | ||
| − | + | <tr style="background-color: #FFFFFF;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">[[parallel.waitForAny]](function1, function2, ...)</td> | |
| + | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">Runs all the functions at the same time, and stops when any of them returns.</td></tr> | ||
| + | |||
| + | <tr style="background-color: #E8E8E8;"><td style="border-top: solid #C9C9C9 1px; padding: .4em;">[[parallel.waitForAll]](function1, function2, ...)</td> | ||
| + | <td style="border-top: solid #C9C9C9 1px; padding: .4em;">Runs all the functions at the same time, and stops when all of them have returned.</td></tr> | ||
| + | |||
| + | </table> | ||
| + | |||
| + | |||
[[Category:APIs]] | [[Category:APIs]] | ||
Revision as of 22:21, 30 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. |