release method
Releases the lock if the requesting owner matches.
Implementation
@override
/// Releases the lock if the requesting [owner] matches.
Future<bool> release(String key, String owner) async {
final lock = _locks[key];
if (lock == null) {
return false;
}
if (lock.owner != owner) {
return false;
}
_locks.remove(key);
return true;
}