Practice coding about thread