Any algorithm involving an infinite loop will hog processor cycles and prevent the browser from doing its job |
To avoid this, we employ an independent thread of execution, which permits the Java Virtual Machine to share cycles among competing tasks |
An animation, in particular, requires a thread |