Skip to content

Commit

Permalink
Update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee-Janggun committed Oct 17, 2024
1 parent bbd6112 commit 2287e7a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lockfree/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,11 @@ where
let mut node = prev_next;
while node.with_tag(0) != self.curr {
// SAFETY: All nodes in the unlinked chain are not null.
// NOTE: This load could be non-atomic, but `crossbeam-epoch`'s atomics does not support
// such fine-grained access options. `core` atomics have `as_ptr()`.
//
// NOTE: It may seem like this load could be non-atomic, but that would
// race with the `fetch_or` done in `remove`.
let next = unsafe { node.deref() }.next.load(Relaxed, guard);

// SAFETY: we unlinked the chain with above CAS.
unsafe { guard.defer_destroy(node) };
node = next;
Expand Down

0 comments on commit 2287e7a

Please sign in to comment.