This is done elsewhere in the file, so it's not about your code specifically, but is it a good idea to have a perpetual while without any kind of timer delay?