From 74bb9c11d7bfd1d1f39b4bf65e2ad7bc66b0c4ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sun, 1 Dec 2019 18:52:51 +0100 Subject: [PATCH] Documentatioon --- GRDB/Core/DatabaseWriter.swift | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/GRDB/Core/DatabaseWriter.swift b/GRDB/Core/DatabaseWriter.swift index 7dbfed815..ab3471e93 100644 --- a/GRDB/Core/DatabaseWriter.swift +++ b/GRDB/Core/DatabaseWriter.swift @@ -177,10 +177,21 @@ public protocol DatabaseWriter: DatabaseReader { // MARK: - Exclusive Lock Prevention - // TODO: doc + /// Starts exclusive lock prevention. + /// + /// During exclusive lock prevention, any exclusive lock is released as soon + /// as possible, and acquisition of exclusive lock is prevented. + /// + /// All database accesses may throw a DatabaseError of code + /// `SQLITE_INTERRUPT`, or `SQLITE_ABORT`. + /// + /// Read-only connections are not affected. Such errors will never happen to + /// `DatabasePool.read(_:)`, for example. + /// + /// Exclusive lock prevention ends with stopPreventingExclusiveLock(). func startPreventingExclusiveLock() - // TODO: doc + /// Ends exclusive lock prevention. See startPreventingExclusiveLock(). func stopPreventingExclusiveLock() }