We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://github.com/ZJULearning/nsg/blob/eceb09e2754d978b4c8b07e3248018987feb597a/src/index_nsg.cpp#L308C7-L308C7
这里会用一个锁来读取 des_pool,之后又会加个锁写入 des_pool,假如处理另一个节点的函数在读、写操作中间读了,又在本线程写后写了数据,那么本线程的工作不就等于没干?
当然,这里这样处理可能是没问题的,在 des_pool 空间未满时,写操作分别在末尾添加数据是没有问题的,在 des_pool 空间已满时,究竟怎么更新数据(把入边反转一下也加入出边?),也许并没有区别?
The text was updated successfully, but these errors were encountered:
全程加锁会有些延长执行时间,读写分开加锁会快一些,这么做的一个假设是当图比较稀疏的时候,锁冲突概率比较低,你说这种互相干扰的情况发生的概率也比较低,可以忽略。
Sorry, something went wrong.
No branches or pull requests
https://github.com/ZJULearning/nsg/blob/eceb09e2754d978b4c8b07e3248018987feb597a/src/index_nsg.cpp#L308C7-L308C7
这里会用一个锁来读取 des_pool,之后又会加个锁写入 des_pool,假如处理另一个节点的函数在读、写操作中间读了,又在本线程写后写了数据,那么本线程的工作不就等于没干?
当然,这里这样处理可能是没问题的,在 des_pool 空间未满时,写操作分别在末尾添加数据是没有问题的,在 des_pool 空间已满时,究竟怎么更新数据(把入边反转一下也加入出边?),也许并没有区别?
The text was updated successfully, but these errors were encountered: