Posted 19 July 2015 - 09:58 PM
Hello! My OS uses the parallel API to run multiple things at once (for instance, a home button bar and a shell area). I am looking for a way to be able to completely pause the execution of the shell area while my home button row does a popup application. I would like to do this in a fashion similar to the parallel API and I would like to be able to pause this thread based on a variable.
In case that sounds confusing, I'll make it less confusing: I need to pause specific threads if a variable is set true and resume them once said variable is false.
Also I have no idea how the coroutine API works that's why im using parallel pls don't kill me.
This is the code in my OS:
This is my other bit of code:
If anyone can help me this would be greatly appreciated.
In case that sounds confusing, I'll make it less confusing: I need to pause specific threads if a variable is set true and resume them once said variable is false.
Also I have no idea how the coroutine API works that's why im using parallel pls don't kill me.
This is the code in my OS:
function backgroundProcesses()
function flightBar()
shell.run("/OTOS/flightBar")
end
function otherBackgroundProcesses()
shell.run("/OTOS/background")
end
term.redirect(shellArea)
parallel.waitForAny(flightBar, otherBackgroundProcesses)
end
This runs the background processes including my "flight bar" which is my home button row.This is my other bit of code:
function runOTOScore()
print("Running preliminary processes...")
shell.run("OTOS/._preliminary")
print("Grabbing version files...")
fs.delete("/version")
shell.run("pastebin get ZxBUvTSG version")
print(shell.run("/OTOS/core"))
os.unloadAPI("OTOS")
end
This is the thing I need to be able to pause, and have it not resume until a variable is triggered, since it contains the shell area.If anyone can help me this would be greatly appreciated.