-
Notifications
You must be signed in to change notification settings - Fork 456
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
skiplist: a new iteator which is sendable among threads #1091
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: SpadeA-Tang <u6748471@anu.edu.au>
crossbeam-skiplist/src/base.rs
Outdated
/// A lock-free skip list. | ||
pub struct ConcurrentSkipList<K, V> { | ||
/// The underlying skip list | ||
list: Arc<SkipList<K, V>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could add a method that takes self: Arc<Self>
instead of creating a new type. Like:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the reply. It's a bit late here, I will see it tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have modified the code. PTAL again, thanks @taiki-e . If this is desired, I will add more tests.
Signed-off-by: SpadeA-Tang <u6748471@anu.edu.au>
Signed-off-by: SpadeA-Tang <u6748471@anu.edu.au>
Signed-off-by: SpadeA-Tang <u6748471@anu.edu.au>
Ref #1090
This PR implements a wrapper of the skiplist which supports creating iteator that is sendable among threads.
More tests or comment can be added if this is needed.