release method

Future<void> release(
  1. LockIdentifier identifier
)

Releases a lock with the provided identifier from the database.

Implementation

Future<void> release(LockIdentifier identifier) async {
  await safe((db) async {
    final stmt = db.delete(db.locks)
      ..where((e) => e.holder.equals(identifier.val));

    await stmt.go();
  }, tag: 'lock.release($identifier)');
}