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

Running a file in a coroutine

Started by MarioBG, 25 August 2015 - 12:25 PM
MarioBG #1
Posted 25 August 2015 - 02:25 PM
Greetings, ladies and gentlemen!
So this morning I was looking at the code for my old operating system, which did not include any multitasking, and I decided I'd set up for the challenge. However, I've run into the first of what I'm sure is going to be a long series of problems.

Coroutines, as they are, run functions, and I wanted to make sure I set for the best alternative when translating a file to the coroutine. From the top of my head, I can think of shell.run and dofile to do this. Are these any good for the job, or can you think of something better?

Also note that I intend the coroutine for the file to be called from within another coroutine which handles the window frame. Help would be massively appreciated as to how could I make each of these coroutines draw to a different window. Thanks!
KingofGamesYami #2
Posted 25 August 2015 - 03:36 PM
You can start by reading the multishell code. Using shell.run is a bad idea, I'd recommend loadfile.