79 posts
Posted 22 March 2012 - 09:29 PM
A nice feature would be a program that can be running all the time, this could make things such as keyloggers possible, having a program in the background recording all the keys, but still allowing you to do things.
473 posts
Location
Poland
Posted 22 March 2012 - 09:31 PM
it's possible, i can write it in no time at all. It's actually being done all the time, as computers run both shell and rednet at the same time.
try reading about parallel API.
38 posts
Posted 22 March 2012 - 11:42 PM
Well…kinda in parallel…
Best bet is to run your "background" program then create a coroutine of your foreground program (or parallel which ever peels your banana) and have you background program yield(or os.pullEvent) then when ever your background programs resumes from it's yield, pass the event and params on to the foreground program using coroutine.resume(…)
Lua does not support threads or parallel processing outside of multiple interpreters. (for our loss… :(/>/> )
Coroutines are your best bet, but it's little more the well organized task switching.
79 posts
Posted 22 March 2012 - 11:54 PM
Thanks guys, I havn't got much into Coroutines or Parallel API, ill have to look into that.