Skip to content

优化翻译:24-Concurrent-Programming.md#并发的超能力 #594

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 25, 2020

Conversation

TENCHIANG
Copy link
Contributor

先优化一节,后续还会优化并发这一章节


因此,并发似乎充满了危险,如果这让你有点害怕,这可能是一件好事。尽管 Java 8 在并发性方面做出了很大改进,但仍然没有像编译时验证 (compile-time verification) 或受检查的异常 (checked exceptions) 那样的安全网来告诉你何时出现错误。通过并发,你只能依靠自己,只有知识渊博,保持怀疑和积极进取的人,才能用 Java 编写可靠的并发代码。
因此,并发似乎充满了危险,如果这让你有点害怕,这可能是一件好事。尽管 Java 8 在并发性方面做出了很大改进,但仍然没有像编译时验证 (compile-time verification) 或受检查的异常 (checked exceptions) 那样的安全网来告诉你何时出现错误。关于并发,你只能依靠自己,只有知识渊博、保持怀疑和积极进取,才能用 Java 编写可靠的并发代码。
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

「只有知识渊博、保持怀疑和积极进取」 这个感觉少个点东西,因为都是修饰词

「只有知识渊博、保持怀疑和积极进取的人」


现在假设你有一个奇怪的超能力。你可以将自己一分为二,然后在继续前进的同时将另一半送到另一个走廊。每当你在走廊或楼梯上遇到分隔到下一层时,你都会重复这个分裂的技巧。最终,整个建筑中的每个走廊的终点都有一个你。

每个走廊都有一千个房间。你的超能力变得有点弱,所以你只能分裂出 50 个自己来搜索这间房间
每个走廊都有一千个房间。此时你的超能力变得弱了一点,一个房间只能分裂出 50 个人进去搜索
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

英文原文完全不是这个意思吧「个房间只能分裂出 50 个人进去搜索。」

你只能克隆 50 个自己来并发搜索走廊里面的房间

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个意思确实翻译错了,就去改

@sjsdfg sjsdfg merged commit 6eab4fb into lingcoder:master Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants