docs: fix comments
This commit is contained in:
@@ -204,8 +204,6 @@ pub struct Core<S, ST, C, KC> {
|
||||
storage: ST,
|
||||
cryptor: C,
|
||||
key_cryptor: KC,
|
||||
// use sync `std::sync::Mutex` here because it has less overhead than async mutex, we are
|
||||
// holding it for a very shot time and do not `.await` while the lock is held.
|
||||
data: LockBox<CoreMutData<S>>,
|
||||
supported_data_versions: Vec<Uuid>,
|
||||
current_data_version: Uuid,
|
||||
|
||||
@@ -126,7 +126,9 @@ where
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Prevents `await`s while the lock is held. Awaiting could cause deadlocking.
|
||||
/// Uses sync `std::sync::Mutex` because it has less overhead than async mutex. Its intended use is
|
||||
/// for short data accesses. Prevents `await`s while the lock is held. Awaiting could cause
|
||||
/// deadlocking.
|
||||
#[derive(Debug)]
|
||||
pub struct LockBox<T> {
|
||||
inner: SyncMutex<T>,
|
||||
|
||||
Reference in New Issue
Block a user