You’re getting this message due to a priority inversion in your code. More details here: https://developer.apple.com/documentation/xcode/diagnosing-performance-issues-early
More specifically, you’re using dispatch_group_wait
which doesn’t provide priority inversion avoidance; so your waiting thread is susceptible to an inversion. Seemingly that’s what’s happening here.