In this case I don’t think it is necessary. A kernel containing
while(1) { }
runs fine when execution is completely serialized (ie. emulation mode), and hangs when executed in a non-deterministic parallel fashion. Quelle surpise?
Another could be that your while loop might be using variables to “synchronize between different blocks” and you might be using those variables to break out of the while loop…
That’s why, instead of hypothesizing about what kind of code you might have written and then finding a solution to it, it would be easier if there’s an actual code to look at… :)