@@ -84,7 +84,8 @@ abstract class SqliteConnection extends SqliteWriteContext {
8484 /// Open a read-write transaction.
8585 ///
8686 /// This takes a global lock - only one write transaction can execute against
87- /// the database at a time.
87+ /// the database at a time. This applies even when constructing separate
88+ /// [SqliteDatabase] instances for the same database file.
8889 ///
8990 /// Statements within the transaction must be done on the provided
9091 /// [SqliteWriteContext] - attempting statements on the [SqliteConnection]
@@ -104,13 +105,20 @@ abstract class SqliteConnection extends SqliteWriteContext {
104105
105106 /// Takes a read lock, without starting a transaction.
106107 ///
108+ /// The lock only applies to a single [SqliteConnection] , and multiple
109+ /// connections may hold read locks at the same time.
110+ ///
107111 /// In most cases, [readTransaction] should be used instead.
108112 Future <T > readLock <T >(Future <T > Function (SqliteReadContext tx) callback,
109113 {Duration ? lockTimeout, String ? debugContext});
110114
111115 /// Takes a global lock, without starting a transaction.
112116 ///
113117 /// In most cases, [writeTransaction] should be used instead.
118+ ///
119+ /// The lock applies to all [SqliteConnection] instances for a [SqliteDatabase] .
120+ /// Locks for separate [SqliteDatabase] instances on the same database file
121+ /// may be held concurrently.
114122 Future <T > writeLock <T >(Future <T > Function (SqliteWriteContext tx) callback,
115123 {Duration ? lockTimeout, String ? debugContext});
116124
0 commit comments