You shouldn't need this runs() as you aren't waiting for anything. I don't think there's much point to pass in func at all. Just run that code inline before you start the check.