acquireWrite method

Future<LockGrant> acquireWrite(
  1. String table
)

Implementation

Future<LockGrant> acquireWrite(String table) async {
  final lock = _lockFor(table);
  lock.pendingWriters++;
  while (!lock.canWrite) {
    await lock.waitFor();
  }
  lock.pendingWriters--;
  lock.exclusive = true;
  return LockGrant(table, LockMode.write);
}