Function used for synchronizing execution.
typedef SyncFn<T> = Future<T> Function(Future<T> Function() fn);