Difference between revisions of "Parallel (API)"
From ComputerCraft Wiki
Line 5: | Line 5: | ||
|- | |- | ||
|[[parallel.waitForAny]]( function1, function2, so on) | |[[parallel.waitForAny]]( function1, function2, so on) | ||
− | | | + | |Runs all the functions at the same time, and stops when any of them returns. |
|- | |- | ||
|[[parallel.waitForAll]]( function1, function2, so on) | |[[parallel.waitForAll]]( function1, function2, so on) | ||
− | | | + | |Runs all the functions at the same time, and stops when all of them have returned. |
|} | |} | ||
[[Category:APIs]] | [[Category:APIs]] |
Revision as of 23:48, 6 October 2012
Parallel is an API which allows you to multitask.
Method name | Description |
---|---|
parallel.waitForAny( function1, function2, so on) | Runs all the functions at the same time, and stops when any of them returns. |
parallel.waitForAll( function1, function2, so on) | Runs all the functions at the same time, and stops when all of them have returned. |