is there a way to do that?
This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
Runing 2 programs parrelell
Started by Duster, 01 April 2016 - 11:35 PMPosted 02 April 2016 - 01:35 AM
i want to have two programs running parallel. one keeping all the other computers on the network on and another taking user input.
is there a way to do that?
is there a way to do that?
Edited on 01 April 2016 - 11:37 PM
Posted 02 April 2016 - 01:42 AM
The easy way is to open a second tab to run the extra script in (type "bg" into shell). This requires an advanced computer.
Posted 02 April 2016 - 01:45 AM
is there a way to write that in a script to put in the startup script. its on a server so the computer keeps turning off. so i don't have to do that every time
The easy way is to open a second tab to run the extra script in (type "bg" into shell). This requires an advanced computer.
Posted 02 April 2016 - 03:39 AM
is there a way to write that in a script to put in the startup script. its on a server so the computer keeps turning off. so i don't have to do that every timeThe easy way is to open a second tab to run the extra script in (type "bg" into shell). This requires an advanced computer.
http://www.computercraft.info/wiki/Multishell.launch
Posted 04 April 2016 - 04:35 PM
Hy I actualy want to do the same thing but I have one tab where I havea command line and the other one has to run a while true loop. I have tried the above but it just runs the loop but the command line in the first tab does not load
Posted 05 April 2016 - 01:18 AM
Difficult to comment without seeing the actual code you're using.
My only guesses are that you either rigged the loop to never yield (in which case you'd expect to see other issues), or more likely, you put the multishell.launch() call somewhere it'd never be executed from (eg underneath your infinite loop).
My only guesses are that you either rigged the loop to never yield (in which case you'd expect to see other issues), or more likely, you put the multishell.launch() call somewhere it'd never be executed from (eg underneath your infinite loop).
Posted 05 April 2016 - 01:41 AM
Or perhaps he's not passing the function pointer and instead running the function inside the multishell call.
Posted 05 April 2016 - 05:31 PM
par1=loadfile('fileA')
par2=loadfile('fileb')
parallel.waitForAll(par1,par2)