writeLock<T> method
Future<T>
writeLock<T>(})
override
Takes a global lock, without starting a transaction.
In most cases, writeTransaction should be used instead.
The lock applies to all SqliteConnection instances for a SqliteDatabase. Locks for separate SqliteDatabase instances on the same database file may be held concurrently.
Implementation
@override
Future<T> writeLock<T>(Future<T> Function(SqliteWriteContext tx) callback,
{Duration? lockTimeout, String? debugContext}) {
return mutex.lock(() => callback(SyncWriteContext(db)),
timeout: lockTimeout);
}