mutexSnapshot method

  1. @visibleForTesting
Future<DateTime> mutexSnapshot()

Perform a snapshot while taking out a mutex to avoid concurrent calls.

Implementation

@visibleForTesting
Future<DateTime> mutexSnapshot() async {
  return _snapshotLock.synchronized(() {
    return performSnapshot();
  });
}