Keeping a thread alive is not an easy task.