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

关于加锁方式的疑问 #8

Open
LongTengYiFei opened this issue Nov 11, 2022 · 1 comment
Open

关于加锁方式的疑问 #8

LongTengYiFei opened this issue Nov 11, 2022 · 1 comment

Comments

@LongTengYiFei
Copy link

每次操作跳表都加锁,这是否会导致多线程排队执行(相当于单线程)。

@RoachNier
Copy link

delete和insert必须要加锁的,这里应该没有疑问。但问题是find没有加锁,可能导致读线程和写线程冲突,因此应该读时加读锁,写时加写锁的。

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

2 participants