Closed jeehoonkang closed 3 years ago
At this issue tracker means this issue? #540
In lock-free data structures, guard
from crossbeam-epoch
keeps the current thread pinned. Out of curiosity, I looked into the internal implementation of Guard
, but unable to understand how the thread stay pinned after all.
guard
and why we use guard
in lock-free data structures again?TreiberStack
, if we run the following code in one thread, are there two guards for one thread?
let mut ts = TreiberStack::new();
ts.push(3);
assert_eq!(ts.is_empty(), false);
I heard on find_haris function, (https://github.com/kaist-cp/cs431/blob/main/lockfree/src/list.rs#L101) Line 109(let next) should be acquire to get latest value after found loop. There is no release-acquire pair but only acquire pair. is it okay?
prev
will be the pointer to the head pointer, and next
will be nullptr
. It's well defined.&guard
in the push()
and is_empty()
APIs. Then you may be able to create a single guard and use it for both functions.
We will have a Q&A session on Nov 17th. Please ask questions at this issue tracker beforehand!