Skip to content

Commit

Permalink
rename writer lock
Browse files Browse the repository at this point in the history
  • Loading branch information
marvin-j97 committed Oct 19, 2024
1 parent 4b2cabb commit fcbc60a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tx/keyspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub struct TransactionalKeyspace {
pub(super) oracle: Arc<Oracle>,

#[cfg(feature = "single_writer_tx")]
lock: Arc<Mutex<()>>,
single_writer_lock: Arc<Mutex<()>>,
}

/// Alias for [`TransactionalKeyspace`]
Expand All @@ -34,7 +34,7 @@ impl TxKeyspace {
#[cfg(feature = "single_writer_tx")]
#[must_use]
pub fn write_tx(&self) -> WriteTransaction {
let guard = self.lock.lock().expect("poisoned tx lock");
let guard = self.single_writer_lock.lock().expect("poisoned tx lock");
let instant = self.inner.instant();

let mut write_tx = WriteTransaction::new(
Expand Down Expand Up @@ -202,7 +202,7 @@ impl TxKeyspace {
}),
inner,
#[cfg(feature = "single_writer_tx")]
lock: Default::default(),
single_writer_lock: Default::default(),
})
}
}

0 comments on commit fcbc60a

Please sign in to comment.