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

Page 289 关于写屏障 #67

Closed
questocat opened this issue Apr 14, 2023 · 1 comment
Closed

Page 289 关于写屏障 #67

questocat opened this issue Apr 14, 2023 · 1 comment

Comments

@questocat
Copy link

问题描述

原文

“因此我们所说的 Go 中的写屏障、混合写屏障,其实是指赋值器的写屏障,赋值器的写屏障作为一种同步机制,使赋值器在进行指针写操作时,能够“通知”回收器,进而不会破坏弱三色不变性。”

写屏障这样描述似乎有些容易和 memory barrier 混淆呢,gc barrier 只是插入的一些代码片段,而 memory barrier 则是一种并发同步操作。

@questocat
Copy link
Author

想了下也确实可以称之为是一种同步机制。

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

No branches or pull requests

1 participant