@DTS Engineer document say HealthKit executes queries asynchronously on a background queue. but The method execute(_:) should not block the current thread.
code like
print("execute begin:(Date().timeIntervalSince1970)") HKHealthStore().execute(query) print("execute end:(Date().timeIntervalSince1970)")