You also have a race between thread.start() and timerThread = thread