Only JCL can answer this, because he wrote the coroutine support.
The question is: the calling function is stored on the stack before the called function is being called. So, the wait call of the called action would be placed in the queue before the wait instruction of the calling function in the very first frame. But it could be as well the case that the wait instructions are executed in the order of the calls of the functions - so the wait instruction of the called function would be executed after the wait call of the calling function.
Nevertheless if 1 frame delay would hurt you or not, this is definitely not good. Normally you use for such a behaviour frame functions (or callbacks for generic code):
Code:
function funcA (...) {...}
function funcB (...) {...}
function funcMain (...)
{
while (1) {
funcA();
funcB();
wait(1);
}
}
By this you assure the right order of your calculations and have no trouble with coroutines. If you are in the case that another programmer does sloppy coroutine programming, simply kick his ass or write it yourself
