This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Giotino's profile picture

[Help] Multitasking

Started by Giotino, 24 April 2012 - 03:38 PM
Giotino #1
Posted 24 April 2012 - 05:38 PM
Can i run more than 1 program on a turtle or a computer.

I would like to make a turtle goes out with a command via rednet, but requires multitasking.
OmegaVest #2
Posted 24 April 2012 - 09:02 PM
Check out the Parallel api. It's kinda a brute-force method of doing this, but it should, in theory, do what you are looking to do.

Also, a simple os.pullEvent() can accept both rednet messages and text commands. If you make a single program that can access others, you can do what you are looking to do.

But, to answer your original question, no you cannot run two programs together, but you can make a whole mess of single-file dual-process programs that can run multiple functions at once.