Example of threading using the Thread class.