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

atomic 在保证线程安全使用方面要注意哪些问题 #92

Open
tbfungeek opened this issue Feb 13, 2020 · 0 comments
Open

atomic 在保证线程安全使用方面要注意哪些问题 #92

tbfungeek opened this issue Feb 13, 2020 · 0 comments

Comments

@tbfungeek
Copy link
Owner

atomic用于保证属性setter、getter是原子性操作,在setter、getter内部加了锁来保证操作的线程安全,但是对于容器类型使用添加元素删除元素等操作这些是非线程安全的这点需要十分注意。

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