thread shutdown is different on windows