abortableReadLock<T> abstract method

Future<T> abortableReadLock<T>(
  1. Future<T> callback(
    1. SqliteReadContext tx
    ), {
  2. Future<void>? abortTrigger,
  3. String? debugContext,
})

Takes a read lock, without starting a transaction.

The lock only applies to a single SqliteConnection, and multiple connections may hold read locks at the same time.

If abortTrigger is set and completes before the database was able to obtain a read lock, an AbortException will be thrown.

Implementation

Future<T> abortableReadLock<T>(
  Future<T> Function(SqliteReadContext tx) callback, {
  Future<void>? abortTrigger,
  String? debugContext,
});