Skip to content

Commit

Permalink
add convenience methods
Browse files Browse the repository at this point in the history
  • Loading branch information
wyang5 committed Oct 10, 2024
1 parent 41bc730 commit 88a744f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/smr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,14 @@ impl<'r> ThreadContext<'r> {
});
}

pub fn increment_era(&self) {
self.reclaimer.era.fetch_add(1, SeqCst);
}

pub fn load_era(&self) -> u64 {
self.reclaimer.era.load(SeqCst)
}

fn scan_and_cleanup(&self) {
let mut limbo_list = self.limbo_list.borrow_mut();
let mut intervals = self.intervals.borrow_mut();
Expand Down

0 comments on commit 88a744f

Please sign in to comment.