Runs action while holding the lock, waiting for current holders in other contexts to finish first.
action
Future<T> synchronize<T>(Future<T> Function() action);