You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.
If the shared resource itself is safe for concurrent access, the only part that needs protecting when converting this to multithreaed code is initialization①, but a naive translation such as that in the following listing can cause unnecessary serialization of threads using the resource. This is because each thread must wait on the mutex in orther to check whether the resource has already been initialized.
3.3.1 代码3.11前
一段话
原文
建议改成
原因
原文中的意思强调的是“当仅仅对共享资源需要初始化时,才需要提供锁避免重复初始化”。而这一大段一大段的介绍都是为了强调这一点,这些翻译让我觉得非常晦涩难懂,并且没有参照原文的逻辑顺序。
英文逻辑性是非常强的,同时,翻译时要尽可能完整,不偏离本身英文逻辑的含义,非常建议在翻译的时候,1.完整性,2.理解原文的含义。
The text was updated successfully, but these errors were encountered: