xiaoweiChen / CPP-Concurrency-In-Action-2ed-2019

:book: 作为对《C++ Concurrency in Action - SECOND EDITION》的中文翻译。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

中文版2.1章这里是不是有翻译错误?

Horizon-42 opened this issue · comments

This breaks the association of the thread with the std::thread object and ensures that std::terminate() won’t be called when the std::thread object is destroyed, even though the thread is still running in the background.

现在的翻译是:

如果不想等待线程结束,可以分离线程,从而避免异常。不过,这就打破了线程与std::thread对象的联系,即使线程仍然在后台运行着,分离操作也能确保std::terminate()在std::thread对象销毁时才调用。
实际上应该是确保std::terminate()在std::thread对象销毁不会被调用。

感谢勘误,这的确是一个翻译错误。