read<T> method
Runs action under a shared read lock, releasing it afterward even if
action throws. Multiple reads run concurrently.
Audited: 2026-06-12 11:26 EDT
Implementation
Future<T> read<T>(Future<T> Function() action) async {
await _acquireRead();
try {
return await action();
} finally {
_releaseRead();
}
}