stepping scripts and multi-tasking
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: stepping scripts and multi-tasking
- From: "M M" <mrm677@...>
- Date: 2008年2月13日 14:52:02 -0600
I'd like to embed LUA in my C++ program.
But I'd like to run _multiple_ scripts simultaneously in the same
process in a single thread and I'd like complete control over them. For example:
while (running) {
StepScript1();
do_stuff();
StepScript2();
do_more_stuff();
StepScript3();
StepScript4();
...
}
I've read a bit about the coroutine and yield stuff, but I'd rather be able to step my scripts without relying on them to yield.
Any thoughts on if this is possible with or without modifications to the LUA runtime?
Thanks,
Mike