Skip to content

Tag: infinite-loop

Java infinite loop performance

I have a Thread that only has to work when a certain circumstance comes in. Otherwise it just iterates over an empty infinite loop: Does it affect the performance when the loop actually does nothing but it has to check if it has to do the calculation every iteration? Only creating a this Thread when needed is…