lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



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