SQLite engine: named locks — try_lock, SqliteLockHandle, duration guards (task sqlite-engine-locks)

This commit is contained in:
glm-5.3-flash committed 2026-10-08 13:37:22 +00:00
1 parent 513df0b311
commit 1edcb0e27d
5 files changed
+640 -13

No files matched your search

+10 -4
View File
@@ -199,11 +199,15 @@ impl Store for SqliteStore {
fn try_lock<'a>(
&'a self,
_name: &str,
_owner: &str,
_ttl: i64,
name: &str,
owner: &str,
ttl: i64,
) -> alkstore::BoxedFuture<'a, alkstore::Result<Option<Box<dyn alkstore::Lock>>>> {
Box::pin(async { Err(database_error("lock wiring lands with the mechanism tasks")) })
let name = name.to_string();
let owner = owner.to_string();
let writer = self.writer.clone();
let closed = self.closed.clone();
crate::lock::try_lock(&name, &owner, ttl, writer, closed)
}
fn schedule<'a>(
@@ -241,6 +245,8 @@ impl Store for SqliteStore {
}
}
#[cfg(test)]
mod lock_tests;
#[cfg(test)]
mod notify_tests;
#[cfg(test)]