you mean there is a while in each action? and you see their results every frame?
it's basically that all entites actions run one by one, but they are all run once at every frame, this a very very fast process that you cant feel the lag between executions of whiles. they run every frame, one after the other, not same time. At any given time only one action runs.
if you mean that you have 2 whiles in main, this is most likely it runs the first one then the other one, or it never runs 2nd if you are using infinite loops.
---
but if you want threads, you can do it. (Search forum.)