terminate if more than one thread is being started.