Let's say I have two functions:
Code:
void bla()
{
while(1)
{
//do something
wait(1)
}
}
and
Code:
void blub()
{
bla();
while(1)
{
//do something
wait(1)
}
}
blub calls bla - the while loop of bla starts running.
Afterwards the while loop of blub is started.
Now my question: Is it GUARANTEED that the while loop of bla is ALWAYS processed before the while loop of blub or can there be random behaviour?
Why should someone use a setup like this?
Well, I've written a DLL for a input device. It is used with a script which simualtes key_... and joy_raw values for this device. This is supposed to be done in bla(). The user writes his function blub(), calls the main function for the device one single time (bla) and then can use the values in his own while loop - without having to use proc_late() or whatever. Does this work out, or can it cause a one frame delay (which DOES hurt)?