Why does while(1) and wait(1); cause so many problems for lots of entities in their own loop?