synchronized<T> method
Locked per instance unless in memory.
Implementation
Future<T> synchronized<T>(Future<T> Function() action) async {
var path = (getPath() ?? getDatabase()?.path!)!;
if (isInMemory(path)) {
return await action();
}
return await (_MultiInstanceLocker(path).synchronized(action));
}