wait for 2 thread execution