Skip to content
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

book: avoid implication that volatile may be usable in concurrency #281

Merged
merged 1 commit into from
May 20, 2024

Conversation

frederick-vs-ja
Copy link
Contributor

resolve #278

Description

Remove potentially misleading implication that volatile may be usable in concurrency.

Change List

  • Resolve error content of volatile and concurrency

Reference


说明

移除可能有误导的对于 volatile 可用于并发的暗示。另外在中文版示例中也加上了和英文版一样的 volatile 修饰,表示此处使用 volatile 没有意义。

变化箱单

  • 解决了关于 volatile 与并发的描述性错误

参考文献

@Mq-b
Copy link
Contributor

Mq-b commented May 17, 2024

此处 int flag 增加 volatile 意义何在?

@frederick-vs-ja
Copy link
Contributor Author

此处 int flag 增加 volatile 意义何在?

英文版之前已经加了多余的 volatile。我的想法是在这里加上 volatile 可以表示 volatile 对于多线程同步的目的没有用。

@Mq-b
Copy link
Contributor

Mq-b commented May 17, 2024

此处 int flag 增加 volatile 意义何在?

英文版之前已经加了多余的 volatile。我的想法是在这里加上 volatile 可以表示 volatile 对于多线程同步的目的没有用。

妙。

@changkun changkun merged commit 5c50dbc into changkun:master May 20, 2024
@frederick-vs-ja frederick-vs-ja deleted the no-concurrent-volatile branch May 21, 2024 01:38
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.

多线程中不该牵扯 volatile 关键字,且描述经不起推敲没有逻辑,带有错误暗示
3 participants