waiting for thread start