You will have to be more specific if you want more specific help.
One problem could be starvation - If you want to run several while loops in parallel, they have to be cooperative.
This means that every loop has to either:
1... Have a WAIT function (Wait X mSec or Wait until next mSec multiple).
2... Have an EVENT structure.
3... Have an operation that causes a sleep, such as TCP WAIT ON LISTENER, or READ ANALOG INPUTS with a reasonable (nonzero) timeout value.
(There are probably other cases I am forgetting at the moment).
The idea is that if you don't give the CPU time, some things won't get done.