Serialize repository database access: at most one open handle at a time for this repository. Acquire before any domain call.
(&self)
| 54 | /// Serialize repository database access: at most one open handle at a |
| 55 | /// time for this repository. Acquire before any domain call. |
| 56 | pub async fn exclusive(&self) -> tokio::sync::MutexGuard<'_, ()> { |
| 57 | self.gate.lock().await |
| 58 | } |
| 59 | |
| 60 | /// Move maintenance exclusion into blocking work so cancelling its caller |
| 61 | /// cannot release the gate while that work is still using the database. |