Skip to content

Commit

Permalink
Add comment on most_recent_write
Browse files Browse the repository at this point in the history
  • Loading branch information
apfitzge committed Aug 9, 2024
1 parent 0c7fb14 commit 88ffad0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ pub(crate) struct Lock<Id: TransactionId> {
kind: AccessKind,
// Current Reads or Write
current_locks: SmallVec<[Id; 4]>,
// This can only be populated when the current lock is a read-lock, and
// there has been a previous write-lock.
// Tracks the most recent, but not current, write-lock.
// It is necessary to track, because all current read-locks will conflict
// with the most recent write-lock.
most_recent_write: Option<Id>,
}

Expand Down

0 comments on commit 88ffad0

Please sign in to comment.