Update thread2.cpp