acquireWrite method
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);
}