submodules

This commit is contained in:
Aiden McClelland
2021-03-23 14:45:51 -06:00
parent 7b122c6295
commit 4e96c64c1b
8 changed files with 27 additions and 7 deletions

View File

@@ -10,13 +10,13 @@ edition = "2018"
async-trait = "0.1.42"
fd-lock-rs = "0.1.3"
futures = "0.3.8"
json-patch = { path = "../../json-patch" }
json-ptr = { path = "../../json-ptr" }
json-patch = { path = "../json-patch" }
json-ptr = { path = "../json-ptr" }
nix = "0.20.0"
qutex-2 = { path = "../../qutex" }
qutex-2 = { path = "../qutex" }
serde = { version = "1.0.118", features = ["rc"] }
serde_json = "1.0.61"
serde_cbor = { git = "https://github.com/dr-bonez/cbor.git" }
serde_cbor = { path = "../cbor" }
thiserror = "1.0.23"
tokio = { version = "1.0.1", features = ["sync", "fs", "rt", "io-util", "macros"] }

View File

@@ -880,8 +880,8 @@ impl Locker {
async fn add_write_lock<S: AsRef<str> + Clone, V: SegList + Clone>(
&self,
ptr: &JsonPointer<S, V>,
locks: &mut Vec<(JsonPointer, LockerGuard)>,
extra_locks: &mut [&mut [(JsonPointer, LockerGuard)]],
locks: &mut Vec<(JsonPointer, LockerGuard)>, // tx locks
extra_locks: &mut [&mut [(JsonPointer, LockerGuard)]], // tx parent locks
) {
let mut final_lock = None;
for lock in extra_locks
@@ -900,7 +900,7 @@ impl Locker {
lock.1 = match guard {
LockerGuard::Read(LockerReadGuard(guard)) if !remainder.is_empty() => {
// read guard already exists at higher level
let mut lock = guard.try_lock().unwrap();
let mut lock = guard.lock().await;
if let Some(l) = lock.take() {
let mut orig_lock = None;
let mut lock = ReadGuard::upgrade(l).await.unwrap();