Use a dispatch group instead of a while loop for waiting on the filters to complete.