pub struct StmLog { /* private fields */ }Expand description
A Software Transactional Memory (STM) log.
Records reads and writes during a transaction for conflict detection.
Implementations§
Source§impl StmLog
impl StmLog
Sourcepub fn record_read(&mut self, cell_id: usize, value: i64)
pub fn record_read(&mut self, cell_id: usize, value: i64)
Record a read.
Sourcepub fn record_write(&mut self, cell_id: usize, value: i64)
pub fn record_write(&mut self, cell_id: usize, value: i64)
Record a write.
Sourcepub fn is_aborted(&self) -> bool
pub fn is_aborted(&self) -> bool
Check if aborted.
Sourcepub fn conflicts_with(&self, other: &StmLog) -> bool
pub fn conflicts_with(&self, other: &StmLog) -> bool
Check for write-write conflicts with another log.
Sourcepub fn read_count(&self) -> usize
pub fn read_count(&self) -> usize
Number of reads recorded.
Sourcepub fn write_count(&self) -> usize
pub fn write_count(&self) -> usize
Number of writes recorded.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StmLog
impl RefUnwindSafe for StmLog
impl Send for StmLog
impl Sync for StmLog
impl Unpin for StmLog
impl UnsafeUnpin for StmLog
impl UnwindSafe for StmLog
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more