When it runs in a thread, it can run normally. But when the thread exits, it cannot exit normally, causing an exception.