Now the thread is correctly killed with interrupt signal