From a641b1efd4d75d952bcc98f9fa6e6022416d19b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Wed, 6 May 2020 19:29:48 +0200 Subject: [PATCH] Documentation --- Documentation/SharingADatabase.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/SharingADatabase.md b/Documentation/SharingADatabase.md index 8f4e8e4b7..a93025e4e 100644 --- a/Documentation/SharingADatabase.md +++ b/Documentation/SharingADatabase.md @@ -51,7 +51,9 @@ Since several processes may open the database at the same time, protect the crea private func openDatabase(at databaseURL: URL) throws -> DatabasePool { var configuration = Configuration() configuration.prepareDatabase = { db in - // Activate the persistent WAL mode + // Activate the persistent WAL mode so that + // readonly processes can access the database. + // // See https://www.sqlite.org/walformat.html#operations_that_require_locks_and_which_locks_those_operations_use // and https://www.sqlite.org/c3ref/c_fcntl_begin_atomic_write.html#sqlitefcntlpersistwal if db.configuration.readonly == false {